GET an image from one request, and POST it in the next request as binary

My question:
How do I GET an image file from one request, and use the image file returned in a subsequent request as binary?

How I found the problem:

AWS requires real files to be sent to the POST endpoint, not URLS, but handling a postman test dependency (real files) outside of postman is vastly less efficient for automation or sharing the tests among lots of devs.

I’ve already tried:

Targeting the image like so:


Seems to set the global correctly, but how do I recall that global var to send as a binary file in the subsequent request?

Old attempts:

I tried using the environment vars, but those seem to only take text/strings.

I tried this as a prerequest script:

const postRequest = {
url: ‘’,
method: ‘GET’,
pm.sendRequest(postRequest, (error, response) => {
console.log("request sent " + response.body)