How to use File_WriteBinary

How to use File_WriteBinary

  
Can anyone tell me how to use the FileSystem - File_WriteBinary Action?  I can't seem to find any examples or documentation.
Hi Thomas,

What do you want to achieve? Please explain.

There is binary data extension which you need to add to process binary data.



-- Suraj B
Solution
Hi Thomas,

The first thing to understand (if you don't already) is that the FileSystem extension reads and writes from and to the server. So e.g. any writes to C:\TEMP end up in the C:\TEMP directory of the server.

This also means that the IIS (or Apache equivalent) must be permitted to write at that location (something that's probably not the case by default). This may mean you need to set the Run As user of the eSpace in Service Center to allow IIS to run the eSpace under another than the default user.

That said, the rest is fairly easy. File_WriteBinary has two parameters: "Content", which is the binary content, and "Path" which is the file path including the file name. Do you have any specific goal in mind that you don't know how to do?
Solution
Kilian, I've not got this part: "This may mean you need to set the Run As user of the eSpace in Service Center to allow IIS to run the eSpace under another than the default user." How can we set this in Service Center?
Hi André,

It's on the Operation tab of the Service Center eSpace page, near the bottom. Setting "Run As", "Username" and "Password" (and a separate "Apply 'Run As' Settings" button). Note you need to republish after you change this (as Service Center will helpfully show).
Ok, got it. Thanks Kilian! :)