Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-6702

Update SimpleContentViewHandler to return mime type on file extension and use inline for content-disposition

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Implemented
    • Trunk
    • 16.11.01
    • content
    • None

    Description

      SimpleContentViewHandler will return mime type 'text/html' for all DataResource values without a specified mimeTypeId. Changing to DataResourceWorker.getMimeType will allow determining the mimeTypeId by file extension

      Fixing the mime type will allow the browsers to display content inline if UtilHttp is updated aswell. All unknown extensions will be set to octet-stream causing the browser to prompt for download

      Attachments

        1. ContentDisposition.patch
          5 kB
          Gareth Carter
        2. OFBIZ-6702.patch
          6 kB
          Jacques Le Roux
        3. OFBIZ-6702-2.patch
          6 kB
          Gareth Carter
        4. SimpleContentViewHandler.java.patch
          0.8 kB
          Gareth Carter

        Activity

          People

            jleroux Jacques Le Roux
            gareth.carter Gareth Carter
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: