New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: allow setting through a variable the name of the file to upload #3641
Comments
@josslamberti Thanks for the suggestion! We'll take a look at this. |
may i know the status of this issue? we are in a situation to use this :) |
No ETA just yet. We have some work on variable types on our roadmap, so we'll consider this request then. |
Would love to see this feature, would save me like an hour of manually dredging through tons of file setting options. |
We would love that too ! Also when importing a collection (because we use newman), the path we could set manually in json is removed... |
It would be great o see this added. Its been 2 years since the suggestion. Hopefully, it will be added at some point.... |
It is actually possible. just export the collection to .json and replace the file path by a placeholder like this.
Re import the collection.json back in postman.make sure your files to upload are in your local postman working_directory. |
Hi, @schmitzdenis : Thanks, for the hint. This works only once. |
Not sure to understand the issue then @Chekkov , the filePath will change with any value it's assigned to. So for every iteration of a postman runner, or when you change it with pre-request script at runtime as an example .. |
I have tried but get the same error each time code: Inside postman the Any solution appreciated. |
App Details:
Postman for Windows
Version 5.3.0
win32 10.0.15063 / x64
Feature Request:
When a request includes a file to upload, I'd like to be able to set the name of the file through a variable and/or in the pre-request script.
Currently, when I set the body to 'form-data' and add a key with the type 'file', the only way to set the file to upload is through the file picker. It would be useful to use an environment variable to set the filename (for example, the API I'm testing requires a new file name for every request to avoid erroneous duplicates).
The text was updated successfully, but these errors were encountered: