It might happen, that due to the expiration of the url provided by b.1.2.2.- obtain fileId to delete, the file cannot be uploaded (the link should be valid for some time, but maybe due to some unforseen issue the file was not uploaded on time).
If that is the case, the current request can be used to retrieve a new url, using the file-id that was obtained before
The Postman request:
Request configuration
a.- Headers
Standard headers, nothing to update here.
b.- Body
Values that are used for this demo (selected as Postman type RAW):
Key | Value | Notes |
---|---|---|
fileId | "{{file-id}}" | file Id obtained before via b.1.2.2.- obtain fileId to delete |
c.- Pre-request script
Not used here
d.- Tests script
The following script is executed after the request is sent, to evaluate the response and also to set up environment variables (if they are needed for following requests)
Expected response
e.- Body
equal 1 for the success of the Put request
f.- Headers
The headers provide the updated url in the location entry. The post request test, takes care of updating the upload url on the environment conifguration
g.- Test results
This depends on the test we set up in the test script