This page shows how csFileDownload can be used to control downloads. There are a number of files of different types in a directory that is not web shared. Following a link, or clicking a button will run the download script and stream the file to the browser.
There is only one script that controls the downloads. The links pass the file details in the URL, and the buttons pass the file details as form variables.
The download links are split into two columns. The ones on the left specify that the file should be displayed "inline". On the right the file is indicated as an attachment.
This demo was originally put together when the two main browsers were Microsoft Internet Explorer and Netscape and and there were quite significant differences in behaviour between the two. It can still be useful to see the difference between using the attachment directive compared with inline, and to compare the difference between a form button and linking to the download script.
|Zip File||Zip File|
|PDF File||PDF File|
|Gif Image||Gif Image|
|Jpeg Image||Jpeg Image|
|Html file||Html file|
|Word document||Word document|
|Text document||Text document|
© Chestysoft, 2017.