diff --git a/changes/14056-file-ext b/changes/14056-file-ext new file mode 100644 index 0000000000..ff78c65bcc --- /dev/null +++ b/changes/14056-file-ext @@ -0,0 +1 @@ +* Fixed a bug preventing Windows and Linux users to upload .mobileconfig files in the UI. diff --git a/frontend/pages/ManageControlsPage/OSSettings/cards/CustomSettings/CustomSettings.tsx b/frontend/pages/ManageControlsPage/OSSettings/cards/CustomSettings/CustomSettings.tsx index bf27f50674..eb69a5ad1e 100644 --- a/frontend/pages/ManageControlsPage/OSSettings/cards/CustomSettings/CustomSettings.tsx +++ b/frontend/pages/ManageControlsPage/OSSettings/cards/CustomSettings/CustomSettings.tsx @@ -61,7 +61,9 @@ const CustomSettings = ({ const file = files[0]; if ( - file.type !== "application/x-apple-aspen-config" || + // file.type might be empty on some systems as uncommon file extensions + // would return an empty string. + (file.type !== "" && file.type !== "application/x-apple-aspen-config") || !file.name.includes(".mobileconfig") ) { renderFlash("error", UPLOAD_ERROR_MESSAGES.wrongType.message);