-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 2021.0
-
Component/s: File Upload
-
Release Notes Summary:The MIME type of a document file is set to "application/octet-stream" if undefined.
-
Tags:
-
Backlog priority:650
-
Team:PLATFORM
-
Sprint:nxplatform #120
-
Story Points:3
Steps to reproduce:
- Log in as Administrator and navigate to the personal workspace
- Click on the + button and go to the Import tab
- Select the OPJ file who link is provided in the first comment
- Push the Create button
- Get the JSON export of the newly created document
- Observe that the file:content/mime-type property is set to ???
"file:content":{ "name":"Approval Figure A.2.opj", "mime-type":"???", "encoding":null, "digestAlgorithm":"MD5", "digest":"c648c5380e37539d5844722bf2f942cc", "length":"127335",1%20-%20id.86054%20Approval%20Figure%20A.2.opj?changeToken=2-0" },
Observed behavior: the customer reports that this MIME type prevents from downloading the binary though an integration point with another Java application, because Jersey http client (and probably others) chokes when parsing the response headers containing the invalid Content-Type header
Expected behavior: If MimetypeRegistryService#getMimetypeFromFile set the blob MIME type to ???, there should be a fallback on application/octet-stream to avoid any issue with the download of the binary