Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-7245

eZFilePasstroughHandler always sends content out with an attachment disposition

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Medium Medium
    • None
    • 3.6.2
    • Misc
    • None
    • Version: 3.6.2
      PHP Version: 4.3.11
      Webserver: Apache 2.0.54
      Database: MySQL 4.1.14

    Description

      If you directly link to a binary file, such that its URL starts:

      /content/download/...

      and you're using the passthrough handler, the HTTP response includes a "Content-disposition: attachment;..." header.

      This is usually fine, unless you want to make things appear inline in the browser (e.g. PDFs).

      My suggestion is to allow this to be controlled via an ini setting.

      The attached patch allows you to set a MimeDisposition variable in the FileDisposition group of file.ini, and control which MIME types are sent inline.

      eg.
      file.ini.append.php:

      [FileDisposition]
      MimeDisposition[application/pdf]=inline

      will send PDFs inline, but leave everything else alone.

      hth
      vittal

      Attachments

        Activity

          People

            unknown unknown
            vittala vittala
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: