How to set access to local file system for Postman collection

Hi,

I have a Postman collection that hit some endpoints which access the local file system through server side code, however, those calls all end up throwing the error “Could not find a part of the path -filename with path-”, even though the filename exists in the file system.

I am wondering if this is a firewall issue, and how to resolve it.

Hey

This issue usually isn’t related to Postman or a firewall. The error “Could not find a part of the path” actually comes from your server-side code, meaning the backend couldn’t locate the file it’s trying to access on its own file system.

A few things to check:

  • Path type: Make sure your server code uses the correct absolute path (not relative).

  • File location: Confirm the file exists on the same machine or container where your backend is running (Postman doesn’t access your local file system).

  • Permissions: Ensure the process running the server has read access to that path.

  • Docker: If you’re using containers, mount the host directory as a volume so the file is visible inside.

Firewalls affect network traffic, not local file access — so this error is almost certainly a file path or permissions issue on the server side.

Hope that helps!

Hi Karan,

Thanks for the reply.

The server code works fine, as the regular app works correctly when calling the docker container. I can confirm the file exists on the same machine.

I tried to mount the host directory as a volume, but running postman still threw the same error.

I am wondering if postman runs under a process that needs permissions to the local file system.

Hey @danielxi

Could you share an example of what your request looks like that’s accessing your local file system? Are these using form-data and have a file specified in the payload?

Hi Danny,

The postman collection does not have the file specified in the payload, it’s the microservice code that calls a C# assembly, which has the code that retrieves data from a file in the local file system.

There is support for accessing your local file system coming to Postman soon. That would be in a very specific way though by connecting a Workspace to a local project on your machine.

Currently, Postman doesn’t have access to your full local file system to be able retrieve data in the way that I believe your trying to do this here. There are a few different ways that it can reference local files, like with the form-data payload file and a CSV/JSON datafile used with the Collection Runner and Monitors.

1 Like

Hi Danny,

Thanks for the feedback, that is good to know.

Regards.