Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-11575

Improve the accuracy of the attachment content type detection

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 6.4-milestone-2
    • 6.4-milestone-1
    • Old Core
    • None
    • Unit
    • Easy
    • N/A

    Description

      We use Tika to detect the attachment content type but we rely only on the attachment file name. This means that if you upload a text file named "foo" (no extension) and call:

      $doc.getAttachment('foo').mimeType
      

      you will get "application/octet-stream". We can improve the accuracy by using the attachment content when the file name extension is unknown.

      Attachments

        Issue Links

          Activity

            People

              mflorea Marius Dumitru Florea
              mflorea Marius Dumitru Florea
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: