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

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Implemented
    • Affects Version/s: Trunk
    • Fix Version/s: 16.11.01
    • Component/s: content
    • Labels:
      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

            • Assignee:
              jacques.le.roux Jacques Le Roux
              Reporter:
              gareth.carter Gareth Carter
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: