Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-2624

Correct mimetype not identified when uploading via Explorer or ftp

    Details

      Description

      [Steps to reproduce]
      1) Put mimetypes-extension-map.xml in extension/mimetype/
      this file extends Alfresco with 3 new mime types:
      ∙ application/x-xmind (extension: xmind, xmap)
      ∙ application/vnd.mindjet.mindmanager (extension: mmap, mmp, mmpt, mmat, mmmp, mmas)
      ∙ application/bizagi-modeler (extension: bpm)
      2)Start Alfresco
      3)Send via FTP the attached files to the repository
      4) Check the mimetype of the uploaded files on the details properties page on Share

      [ Actual Result]
      Documents have ZIP mimetype

      [Expected result]
      Files should have the correct mimetype

      [Notes]
      ∙ If files are uploaded through Share the correct mimetype is visible
      ∙ Sending the files via FTP org.alfresco.repo.content.MimetypeMap.guessMimetype(String, ContentReader) is invoked
      Possible workaround/solution -> add MediaType.APPLICATION_ZIP.equals(type) check:
      // If Tika has supplied a very generic type, go with the filename one,
      // as it's probably a custom Text or XML format known only to Alfresco
      if (MediaType.TEXT_PLAIN.equals(type) || MediaType.APPLICATION_XML.equals(type) || MediaType.APPLICATION_ZIP.equals(type))

      { return filenameGuess; }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                closedbugs Closed Bugs
                Reporter:
                mmancuso Marco Mancuso [X] (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                13 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 - 7 hours
                  7h