Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-17450

Detect MIME type from Nuxeo registry

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.0
    • Fix Version/s: 8.10
    • Component/s: File Upload
    • Tags:
    • Backlog priority:
      500
    • Impact type:
      Configuration Change
    • Upgrade notes:
      Hide

      From now, when importing files with Drag'n drop, the considered mime type is:

      • the one from Nuxeo MimeTypeRegistry corresponding to the file name extension, if found
      • the one sent by the browser/OS, if found and consistent
      • the one calculated by sniffing in the file content, if found
      • the default one: "application/octet-stream".
      Show
      From now, when importing files with Drag'n drop, the considered mime type is: the one from Nuxeo MimeTypeRegistry corresponding to the file name extension, if found the one sent by the browser/OS, if found and consistent the one calculated by sniffing in the file content, if found the default one: "application/octet-stream".

      Description

      Currently we have inconsistent behavior when importing files with Drag'n drop because the system relies on the MIME type sent by the browser/OS.
      For exemple a .xml file has:

      • text/plain when sent from IE
      • text/xml when sent from Firefox

      As a result, a Note or a File document will be created in Nuxeo Platform.

      The same problem was also reported with .pdf file or .stp file.

      What should Nuxeo do?
      Nuxeo should read the content of the mimetype registry to determine the mimetype of the file according to its extension.


      Solution to reproduce the browser issue with IE:

      1. open regedit
      2. navigate to HKEY_CLASSES_ROOT\.xml
      3. change the ContentType value from text/xml to text/plain
      4. restart IE
      5. D&D a .xml file
      6. it will create a Note document instead of a File document

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                2 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day, 3 hours, 30 minutes
                  1d 3h 30m

                    PagerDuty

                    Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.