Does anybody know a way of creating a downloadable file (lets say .txt) for a webbrowser without using an attachment in a document?
I’m going to create a file for a user just for one download.
My server administrator did not want any temp-directories on his Linux box, so I have to choose another way.
A webagent creates an HTML-document using every print-statement as content. Is there a way to use as certain header to let the browser claim this for a downloadable file?
Subject: Creating downloadable file using WebAgent
Use this as your first print statement to the browser.
Print {content-type:application/html}
The user will have to add the extension to the file. { .txt or .htm } when saving.
If you instead use.
Print {content-type: application/msword}
The browser will try to save the file as a Word Document. This may or may not be a better solution depending on your formatting and functionality of the static page.