fileupload element - download script question

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!!
 
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
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top