When running collection via Postman Runner it fails, but when I send the requests sequentially in the same folder everything works as expected

In the collection the first request uploads photo, then the second one should take some data from the firs request’s response.
So when I run the collection via Runner it fails to upload photo and consequently the second request fails again as the photo is not uploaded.
The screenshot of console log is attached

!
But when I open the collection and send the same requests manually everything works correct.
What is the problem ?
Thanks in advance

What response are you getting from your upload photo request?

Screenshot at Dec 13 18-56-57

How are you passing the photo content to the request? Is it via an environment variable?

If it is in an environment variable, are you using the correct environment in the collection runner?

No. I upload photo (.jpg) in body as file from computer.

When I send the request manually I receive the expected response. - photo uploads correctly but when I run the collection I am receiving the response that showed above.

I don’t think the issue is linked with environment.

I am trying to understand something here.

  1. what kind of api are you using that uploads Photo? any examples will help? like flickr
  2. Check the request/response time of first request you made manually and same time variables when you run in collections?

I feel uploading photo to some server will take time based on the size of photo and other factor.

This is the API:

POST - {{url}}/photos/add.json?key={{json_key}}
Body - file

This is the time of first sent request (sent manually) - Time :2126 ms, 200 OK (file uploads)

This is the time of sending the same request automatically (via Runner) - Time: 427 ms, 400 Bad Request

In console logs I see this message when running the request automatically.
Seems there is problem with file uploading

this is response:
2