I have a project that can upload files to AWS in a secure way. Postman was chose to test endpoints, but when I try to upload a file, is hard to mix the secure AWS s3 upload with the postman context. Considering there is an endpoint returning a presigned url that uploads to aws, how can I test the upload completely?
Asked
Active
Viewed 486 times
1 Answers
0
It is a simpler process,
Open Postman: Launch Postman and create a new request.
Configure the request:
Set the HTTP method to PUT. Paste the pre-signed URL you generated earlier in the 'Enter request URL' field.
Under the 'Headers' tab, add the following header: Content-Type. Set its value to the MIME type of the file you want to upload (e.g., image/jpeg for a JPEG image, application/octet-stream for a generic binary file, etc.).
Under the 'Body' tab, select the 'Binary' radio button. Click the 'Select File' button and choose the file you want to upload from your local system.
Send the request: Click the 'Send' button in Postman to upload the file to the specified S3 bucket. If the request is successful, you should receive a 200 OK response. The file will be uploaded to the S3 bucket with the specified key.

Kannaiyan
- 12,554
- 3
- 44
- 83
-
it is true, but how should I do it when I run the request, automatically? Because this way you said, Every time I would send the request I need to update things – Germano May 03 '23 at 17:57
-
treat your url as environment or session variable, and update variable in a previous request – Kannaiyan May 03 '23 at 18:23