cancel
Showing results for 
Search instead for 
Did you mean: 

How to set header “Content-Type” and “slug" values for ZIP files during post command

Former Member
0 Kudos

Hi All,

I am referring to

Uploading Files to SAP GW, Downloading Files from SAP GW - New Techniques blog by Peter Marcely to upload files in SAP Gateway system.


My requirement is to upload Zip Files (which will have XML files zipped) through SAP Gateway service and save each XML file in Application Server of SAP gateway system.


I have built gateway service as mentioned in the above blog,

I am ready to post file through GW.

But as I am new to gateway I don't know how to prepare the HTTP request for this.


Please let me know what will be Header "Content-Type" and "slug" values for my ZIP file.

How do I link my Zip File in my local desktop to HTTP request values and run the POST HTTP method.


It will be great help if you let me know the steps to add my Zip file name to slug header name value.


Thanks a lot and appreciate all your help.


Kind Regards,

Madhu M V

Accepted Solutions (1)

Accepted Solutions (1)

AshwinDutt
Active Contributor
0 Kudos

Hello Madhu,

All you need to do is just click on add file and browse the .zip file and attach in GW Client.

Next for zip files set ' Content-Type ' as ' application/x-zip-compressed  '

Keys should go in ' slug ' parameter. In the screen shot you are already passing correctly.

Rest would be same as shown in blog which your are referring.


Regards,

Ashwin

Former Member
0 Kudos

Hi Ashwin,

Thanks a lot for your support, that really helps. Appreciate!

That was quick response.

One doubt:

In screen shot I have SLUG = image.jpg. I am not loading image, it is a ZIP file. For ZIP files also it is " image.jpg"?

I will implement and mark it as correct answer.

Kind Regards,

Madhu M V

AshwinDutt
Active Contributor
0 Kudos

Its just a key which you would like to maintain to uniquely identify any media content. Its not specific to any types here. Again its left to you to send what is the type here like .zip, .pfd etc.

For example -  ( You can decide with what you would like to store that .zip file as )

Say i have a Document Number 3900000025 for a Company Code 1000 for a Fiscal Year 2016.

Then now i would send slug ' 3900000025_1000_2016_zip  ' in slug and and use this name to store the .zip file. So that later i can identity it easily.

Former Member
0 Kudos

Hey Ashwin,

Thanks a lot for your help once again.

The solution you provided worked.

Kind Regards,

Madhu M V

Answers (1)

Answers (1)

Former Member
0 Kudos