cancel
Showing results for 
Search instead for 
Did you mean: 

Rest post zip file issue

kkishore
New Contributor III

Hi Team,

we are posting a zip file to the target location with restpost snap(invoking the webservice provided by target team), but below information is adding to the file and the zip file not able to open by the team.

Target team receiving the data like below adding extra content at header level:

-NpPpHQYDtTHWk9esbHreg29WnKx_bCYn
Content-Disposition: form-data; name=“file”; filename=“data.zip”
Content-Type: application/octet-stream; charset=UTF-8
Content-Transfer-Encoding: binary

actual data(zip format)

-NpPpHQYDtTHWk9esbHreg29WnKx_bCYn

how to avoid this extra content added to original zip file.

Please find the error here while target team trying to open the zip file stored in Blob field of Database.

image

5 REPLIES 5

mbowen
Employee
Employee

Hi @kkishore

I need to respond to another community post regarding REST POST behavior and will try to address your issue too. I know what you are referring to. Do you know the database the zip is being stored in?

kkishore
New Contributor III

Hi @mbowen ,

the data base is sql server. There is a table and storing the zip file in blob field

@kkishore
Did you try changing the content type? I see that the content type is specified as application/octet-stream which is the default content type for the REST POST snap. Is this a single field upload? If so, try changing the content type to application/zip.

rest-post-zip

kkishore
New Contributor III

Hi @mbowen ,

Yes , it is single file upload, we had tried with content type as below options, but not working

application/octet-stream
multipart/x-zip
application/zip
application/zip-compressed
application/x-zip-compressed