Forum Discussion

manohar's avatar
manohar
Contributor
3 years ago
Solved

Base64 encoded

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

  • 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)

4 Replies

  • 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)