We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19328
    • 433 Posts
    Hi there,

    I'm creating a list of files with FileLister 1.1.1 under MODX Revo 2.2.2. Everything works, except that the files are opened in the browser when you click on them. I've set the MIME-type declarations in .htaccess, but the files hashed by FileLister do not listen to it; they're opened directly in the browser instead of being offered as a download.

    My question is; how do I make the PDF, DOC (and so on) files hashed by FileLister recognized as such so they are being offered as a download instead of them being opened in the browser?

    Some details:

    1) In my root .htaccess:
    <IfModule mod_headers.c>
      <FilesMatch "\.pdf$">
          Header append Content-Disposition "attachment;"
      </FilesMatch>
    </IfModule>


    2) Hashed file link example:
    http://www.example.nl/staff/?fd=%25A6%2594F%25D8s%258E%25D3%250A%25D7%25CB%2517%25A1%258Frw%25C3
    [ed. note: michelle84 last edited this post 14 years, 3 months ago.]
      • 37047 ☆ A M B ☆
      • 309 Posts
      Hi Michelle,

      I realize this is an old thread, but I am considering using fileLister for PDF downloads and would like to force them to download rather than open in the browser. Can you tell us if you ever got this issue sorted?

      Thanks!
        Lucy Iannotti
        Following Sea design & development
        http://www.following-sea.com
        New Bedford, MA
        • 19328
        • 433 Posts
        Quote from: lucy at Oct 09, 2013, 01:29 PM
        Can you tell us if you ever got this issue sorted?
        I'm sorry, I still don't know how to make it work. I use unhashed file URL's right now.
          • 37047 ☆ A M B ☆
          • 309 Posts
          Well I ended up using FileDownload R, which so far works beautifully. BUT - I haven't done extensive browser testing yet to see how often files are downloaded vs. opened -- I think right now it is dependent on the user settings for a browser, which maybe is the better way to do things anyway?
            Lucy Iannotti
            Following Sea design & development
            http://www.following-sea.com
            New Bedford, MA