Downloading files
Permalink Browser Info Environment
I need to upload and download a specific file type, but the add-on tries to open my file in the web browser rather than prompting the user to download the actual file. The problem is the browser converts the file into a notepad file and is then unuasable. Is there a function where it will simply prompt the user for download rather than try to open the file?
Type: | Pre-Sale |
---|---|
Status: | Resolved |
That worked perfect!!! Thank you!!!
Great to hear!
I hate microsoft! So apparently the fix you gave me works perfect for chrome and firefox but not internet explorer. Do you know of another line could add that would work for i.e?
I could depend a bit on what version of Internet Explorer.
You could try something like this in your htaccess:
<FilesMatch "\.(?i:xyx)$">
Header set Content-Disposition attachment
</FilesMatch>
(where xyz is the file extension)
I simply googled for this, you might have better luck.
You could try something like this in your htaccess:
<FilesMatch "\.(?i:xyx)$">
Header set Content-Disposition attachment
</FilesMatch>
(where xyz is the file extension)
I simply googled for this, you might have better luck.
Perfect. I found something similar, kind of a combo of the two, and it works on all browsers now.
Thanks for all your help!
<FilesMatch "\.(?i:xyz)$"> ForceType application/octet-stream Header set Content-Disposition attachment </FilesMatch>
Thanks for all your help!
although I believe there is a way to generate links that force the download of files, this is something I think better handled and controlled at the server level.
I believe you can add something like the following to your .htaccess file:
AddType application/octet-stream .xyz
(where xyz is your file extension, you didn't mention what kind of file type you are talking about)
There are other ways you can handle this in a .htaccess file, but this appears to be the simplest method.