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.