Creating downloadable file using WebAgent

Hi!

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?

Thank in advance!

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.

~R

Subject: RE: Creating downloadable file using WebAgent

Hi Rick!

Thanks a lot!

And if you name the agent like the file you want the user to save, the extension is not a problem anymore:

Name of the agent : demo.txt

Name of the downloaded file : demo.txt

That’s it!

Thanks a lot!

Christian