Hi all,
I would like to set a non text/plain content type for a text file (.asc).
The idea is, to get a download dialog by clicking on the link for this particular file - instead of the content presented directly inside the web browser. I tried adding different Target MIME types (application/zip, pdf, asc to octet-stream) on the link itself, adding custom Content types (on the site settings page), changing the extension to something completely unknown - but the server response was always "text/plain".
How can this be influenced?
Thanks a lot,
Ki
-
β A M B β
- 24,524 Posts
I suspect that this is a "feature" of your browser. It sees that this is really a text file, so displays it as such. Depending on your browser, you may be able to configure it to download instead of displaying.
Hi Sottwell
Thanks for your reply.
It seems not a "feature" of the browser as the http response header (from the apache server) shows a Content-Type=text/plain; charset=ISO-8859-1. Firefox in "View Page Info" also.
Any other assumption? Or how do you think should this be implemented?
Thanks,
Ki
Hi ganeshXL,
Thanks for your reply!
I first just had a file and a link to it (in /assets/files/). But itβs the better way as a resource within MODx and the content-disposition set. Works like a charm. ;-)
Ki