cancel
Showing results for 
Search instead for 
Did you mean: 

Perform REST calls on the AWS S3 bucket using Postman/Ajax

mishra_mayank
Explorer
0 Kudos
5,926

To perform REST calls on the AWS S3 bucket using Postman, I am using below code.

GET /hcp-c73e4669-XXXX-4dd8-XXXX-b1X&X&X&XX&4 HTTP/1.1
Content-Type: application/json
Host: s3-eu-central-1.amazonaws.com
X-Amz-Content-Sha256: e3b0cxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxb855
X-Amz-Date: 20180829T060328Z
Authorization: AWS4-HMAC-SHA256 Credential=AKIAXXXXXXXXXXA/20180829/eu-central-1/s3/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date, Signature=7bax7x7x7x7x7x7x7x7x77xda6
Cache-Control: no-cache
Postman-Token: 013b24bd-faf0-54ae-706e-a66a56dc2bd4

It works with

  • PUT Raw text (Attached image put_raw_text.JPG)
  • PUT Raw Json (Attached image put_raw_json.JPG)

I want it to work with(Expected):

  • PUT Binary Image (Attached image put_binary_picture.JPG)

I am interested in Content-type : Binary/octet-stream for multipart image upload.

We want to use such request as: https://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadInitiate.html

Thanks in advance,

Mateen

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Could you please elaborate the question? I don't really see what you are looking for.

mishra_mayank
Explorer
0 Kudos

i am looking for a postman/ajax way that works with Content-type : Binary/octet-stream. It fails for this with the current s3-aws on SAP, as shown in the screenshot(PUT-binary-image.jpg). Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Mishra,

The software components you are using are not SAP's (expect maybe the underlying system that is behind AWS S3 Bucket.

However, I've googled the error and it looks as though this is a postman related issue. Have you tried to reproduce the request with a 'curl' - such as the ones mentioned in the link provided? Maybe updating the postman application could solve it.

Maybe try to consume this API Gateway with another client application just for sanity checks.

Best regards,
Ivan