-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 10.10
-
Fix Version/s: 10.10-HF31, 11.2, 2021.0
-
Component/s: File Upload , S3
When using any browser on Mac OS to upload a ARW file or a NEF file using the S3 direct upload, an empty mime-type is provided to aws-jdk, defaulting it to application/octet-stream; charset=UTF-8.
The issue is that the Nuxeo Platform triggers its server-side mime-type resolution only if the mime-type is unspecified or application/octet-stream, see https://github.com/nuxeo/nuxeo/blob/e018af03de77189b05dc32357260f202b47e49d1/modules/platform/nuxeo-platform-filemanager-core-listener/src/main/java/org/nuxeo/ecm/platform/filemanager/core/listener/MimetypeIconUpdater.java#L149. Here is a fix suggestion:
@@ -120,7 +120,7 @@ public class MimetypeIconUpdater implements EventListener { } Blob blob = dirtyProperty.getValue(Blob.class); - if (blob != null && (blob.getMimeType() == null || blob.getMimeType().equals(OCTET_STREAM_MT))) { + if (blob != null && (blob.getMimeType() == null || blob.getMimeType().startsWith(OCTET_STREAM_MT))) { // update the mimetype (if not set) using the the mimetype registry // service blob = mimetypeService.updateMimetype(blob);
But the fact that aws-jdk adds "; charset=UTF-8" could have been fixed in a most recent version, or the fix could be in our javascript code calling aws-jdk.
- Is referenced in