Creating a text for downloading

Creating a text for downloading


For a project I need to create a text file that the customer can download from the website.
This text file will be dynamically created.

Is there a way to do this without the FileExtension?
For instance; I can create my content in a text variable but how can I make that downloadable?
Your ideas and comments will be appreciated :)

Hi Hans,

In order to allow downloading the content of a text variable as a text file, you may use the built-in Download node in a screen action.

In the Download node parameters:
- File Name: any filename you want, for example "GeneratedFile.txt".
- Mime-Type: "text/plain".
- Save to Disk: Yes.

The File Content parameter expects a BinaryData input, so you'll have to convert your text variable first. For that, you may use the BinaryData solution. Use the output of the TextToBinaryData action for filling the File Content parameter.

Paulo Ramos

I have a similar problem. But I need to save the file, not make that downloadable. When the file is created, I need it to be saved in a specific folder, server side.

Any ideas?

Thank's in advance
Hi Francisco,

You may try the FileSystem Extension, available here:
Yes, the FileExtension has something for that.

Keep in mind that you need also to set specifice access parameters on the server-side filesystem so that you are allowed to save a textfile on the server.

Normally security will prevent (for good reason) saving text files on the server.
Yap, it worked fine!! Thank's!

I can no longer get to the BinaryData solution.  Does anyone have an updated link for this?  Thanks

Hi Joshua.

Thanks for pointing it out. The link is now working again, even though it will direct you to the Enterprise Manager component, as Tiago put it.

Best regards, and thanks!

Paulo Tavares