โ03-22-2023 11:52 AM
Hi there, I am getting file data in base64 encoded. how do I get the file out of it?
to get file along with filename_2023_03_22.slp (373.8 KB)
Any help greatly appreciated.
Thanks
Manohar
Solved! Go to Solution.
โ03-22-2023 12:23 PM
To accomplish translation of a rest call (via the rest or http client snaps) to the actual binary, you need to follow it by a Mapper and Document to Binary, with your request snap entity being displayed as โBase64 encoded dataโ that just means itโs binary data under the covers and thereโs just really not a way for that to be displayed in the JSON representation. You can auto-map the data in the mapper, but the big thing is translating the $entity
in the upstream value to $content
going into the Document to Binary snap, then you can set the encoding to โNONEโ. Iโve added to your example pipeline to show you and am attaching that here.
to get file along with filename_2023_03_22.slp (376.4 KB)
โ03-22-2023 12:23 PM
To accomplish translation of a rest call (via the rest or http client snaps) to the actual binary, you need to follow it by a Mapper and Document to Binary, with your request snap entity being displayed as โBase64 encoded dataโ that just means itโs binary data under the covers and thereโs just really not a way for that to be displayed in the JSON representation. You can auto-map the data in the mapper, but the big thing is translating the $entity
in the upstream value to $content
going into the Document to Binary snap, then you can set the encoding to โNONEโ. Iโve added to your example pipeline to show you and am attaching that here.
to get file along with filename_2023_03_22.slp (376.4 KB)
โ03-22-2023 02:30 PM
You can also drop the Document to Binary
and just change the Mapperโs output view type from Document to Binary:
to get file along with filename, just mapper_2023_03_22.slp (375.3 KB)
โ03-23-2023 06:09 AM
thank you @ptaylor, appreciate your help.
โ03-23-2023 06:00 AM
@ddellsperger that did it, thank you for your quick help.