Forum Discussion
The way most binary snaps function is to write the binary stream with a metadata document about the contents – kind of like the header in an HTTP request. For example here is some preview data of a MultiFileReader snap I’ve hooked up:
The content-location
field will give the path to the file – the full path. This can be used in a FileWriter snap to write out each file with the same file name in a new location. Here’s an example of an expression that would do that:
Here’s the expression if you want to copy/paste and fill in your server specific information.
"sftp://transmissions-uat.testsite.com/Outbound/Encrypted/" + $['content-location'].split('/').pop()
I put together an example pipeline that hopefully will be useful for demonstrating how this all fits together.
multi-file-read-write_2019_01_23.slp (3.7 KB)
- Aleksandar_A3 years agoContributor III
Hi @manohar,
You can try by using Mapper Snap with the following expression for the attachments:
sl.range(0,$docname.length).map((x,ind) => {"docname":$docname[ind],"id":$id,"docext":$docext[ind],"docid":$docid[ind]})
Try with this, and let me know if this helps you.
BR,
Aleksandar.wow!! you make it look so simple. thank you very much for your help.
Manohar