ChronoEngine.com homepage

Forums

Please write a review for the extension you are using on the Joomla extensions directory before posting a new question as we are being spammed by many negative reviews.

Thank you for your support!

File Downloader - suggested corrections / improvements

abletech 14 Jan, 2014
In ChronoForms v4 stable, I have used the file downloader action, on the submit form event, and I needed to do some corrections / improvements, in the run function.

I'm attaching fixed file.

CUSTOM EDIT 1: in download mode ($dest == 'D'), used in headers real Content-Type and let download to browser with "Content-Disposition: attachment"; this is in order to allow the user to prewiew type of file to download, and correctly open directly from browser (without saving first).

Here seems that the usage of appliction/download or application/force-download is not needed, and in fact in my PHP developer experience I never used it:
http://stackoverflow.com/questions/10615797/utility-of-http-header-content-type-application-force-download-for-mobile

CUSTOM EDIT 2: replaced return with die(), as I does not need to continue execution (this caused memory overflow error)

I hope you could include these improvements in your next releases.
This topic is locked and no more replies can be posted.

2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com