cancel
Showing results for 
Search instead for 
Did you mean: 

Base64 encoded

manohar
Contributor

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

1 ACCEPTED SOLUTION

ddellsperger
Employee
Employee

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.
image
image
to get file along with filename_2023_03_22.slp (376.4 KB)

View solution in original post

4 REPLIES 4

ddellsperger
Employee
Employee

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.
image
image
to get file along with filename_2023_03_22.slp (376.4 KB)

You can also drop the Document to Binary and just change the Mapper’s output view type from Document to Binary:

image

to get file along with filename, just mapper_2023_03_22.slp (375.3 KB)

thank you @ptaylor, appreciate your help.

@ddellsperger that did it, thank you for your quick help.