cancel
Showing results for 
Search instead for 
Did you mean: 

How to post zip file using rest post

kkishore
New Contributor III

Hi All,

I am trying to post the zip file to end point using rest post. The downstream application expecting the ZIP file. They are storing the zip file in the blob column of sql server.

data(zip file name) - storing in the blob column to process further.

how to zip and send the zipped file as it is through rest post snap.
Tried below one .

image

4 REPLIES 4

koryknick
Employee
Employee

@kkishore - I’ve done something similar before. You should be able to get this to work with Binary to Document “Encode or Decode” property set to BYTE_ARRAY, then in the REST Post add an HTTP header for Key=“content-type” and Value=“application/octet-stream”

Hope that helps!

kkishore
New Contributor III

Hi ,
Thanks for your response. I tried all the options in Binary to Document… only Encode_Base64 is passing the data to output view, but the data is in binary not as zip file.

configured below settings in each snap.

file reader snap:
image
compress snap:
image
Binary to Document snap:
image

rest post snap:
image
image

it is not posting zip file, it is posting the binary content. Requirement is to post the zip file in blob column of database

koryknick
Employee
Employee

My apologies for the misunderstanding. I believe what you are looking for is the “Single file upload” properties in the REST Post snap. You will need to stage your file in either the SLDB (your SnapLogic project) or in the snaplex node local file system (FILE:///)

kkishore
New Contributor III

Hi Koryknic,

Thanks for the response ,will try to stage file and then post