1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice

fileupload element - download script question

Discussion in 'Community' started by econveyors, Dec 7, 2018.

  1. econveyors

    econveyors New Member

    Level: Community
    Hello,
    I'm trying to use the fileupload element in a list. I like the url "protection" that the download script gives... I don't want it the direct URL to these files to be visible to the user. However, these are PDF files and it would be great if the users could just open the file in the browser instead of forcing the download.

    I poked around the plugin code and tested removing the "Content-Disposition" header which achieves the result I'm looking for, but I obviously don't want to edit that code then have it overridden the next time I update.

    Any suggestions?

    Thanks!!
     
  2. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    It'd have to be added as an option. Which shouldn't be too hard to do, the fileupload code is littered with examples of checking $this->getParam('foobar', 'some default') to control behavior. The option would just need to be added to the appropriate fieldset in the fileupload.xml, and language strings added to en-GB (and any other language files you happen to need). Something like "Open in browser: yes/no", and a DESC language string that explains it, along with the caveat that this will only work for MIME types that browsers grok.

    If you want to submit a PR, I'd be happy to merge it.

    -- hugh
     
  3. econveyors

    econveyors New Member

    Level: Community
  4. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community

Share This Page