Send base64 Stream in JSON - POST Body

I got to send the Base64 Stream to couple of my POST APIs, I have collection with more then 20 POST request objects with Base64 stream in them, this makes by POSTMAN heavy and sometimes it fails to launch the application itself.

Is there a smart way of dynamically sending the base64 stream on Run time instead of storing it in the request object ?

For example -

  1. I want to keep all my files in local drive.
  2. And refer that specific file location in each of those request objects.
  3. On Runtime the file should get converted in Base64 stream.

@Ram_77,
You can probably have a local server running that returns your base64 string and in your Pre request script, you can use pm.sendRequest and pm.environment.set to assign the response to an environment variable and use the same variable in your request body.

Hello Ram,

I am also facing the same situation. Were you able to find the solution?

Hi Ram,

Could you please share how you are passing your attachment content in json.