cancel
Showing results for 
Search instead for 
Did you mean: 

Downloading a base64 zip file using SOAP

tonyzero
New Contributor II

Hi All,

I am trying to use SOAP call to download a zip file. However, I cannot download and get the file I need correctly. Here is a screenshot of my pipeline.
Capture

I took out the $content, which contains a string that is (at least looks like) base64 encoded data. The “Content-Type” is null and “Content-Transfer-Encoding” is
“binary”.

Then no matter how I decode this string, whether by using Base64.decode() or Base64.decodeAsBinary(), I cannot get the zip file I need. If I use Base64.decode($content), I get something like
Capture1

I can see my file name within a bunch of words that I cannot read. And I think I should not use Base64.decodeAsBinary().

Could someone please tell me what is the correct way to download this zip?

Thanks in advance!

1 ACCEPTED SOLUTION

tonyzero
New Contributor II

Hi @ptaylor ,

I followed you suggestion and it really works. I used Base64.decodeAsBinary($content) together with application/zip → $[‘content-type’] and got the txt file in a zip.
However, I am still not sure why I should use Base64.decodeAsBinary() to decode something what really looks like a base64 encoded string.

Thank you very much!

View solution in original post

10 REPLIES 10

Hi @j.angelevski ,

Thank you so much for your reply. It actually works with Base64.decodeAsBinary($content) and I got what I need.