Jump to content

making file available for download instead of opening in browser?


sploit

Recommended Posts

Hiya,

I have a simple script which uploads a CSV file to the server.
It is saved as filename.csv.
I have a direct link to this uploaded file such as <a href="http://www.myserver.com/files/myfile.csv">Download CSV File</a>

When I click the link, it gives me an option to download the file.


Now I uploaded this same script on another server.
On clicking the "Download CSV File" link on this server, it opens the CSV file in the browser instead of giving me the download box.

Can I set up the .htaccess file in some way on the second server that would allow the CSV file to be downloaded instead of opened in the browser?

Thanks!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.