-
Type: Task
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 5.6.0-HF35, 5.8.0-HF02, 5.9.1
-
Component/s: Nuxeo Drive
In some cases, the call to mimetypes.guess_type(filename) in base_automation_client.upload() returns a bad mime type.
For example, on Windows, the mime type guesser uses the registry and might return "pdf" instead of "application/pdf", don't really know why...
Since NXP-13036 the WebEngineServlet should detect this and patch the "X-File-Type" HTTP header to add the missing "application/" part if missing, thus avoiding:
[org.nuxeo.ecm.automation.server.jaxrs.batch.BatchResource] Error while executing automation batch ... Caused by: javax.mail.internet.ParseException: Expected '/', got null at javax.mail.internet.ContentType.<init>(ContentType.java:102) at org.nuxeo.drive.operations.NuxeoDriveOperationHelper.normalizeMimeTypeAndEncoding(NuxeoDriveOperationHelper.java:55) ...
- depends on
-
NXP-13036 Error when uploading file with empty mimetype by drag&drop
- Resolved