Reputation: 51
Could you please tell me how to upload file without USING File option. I would like to know how I can upload file by following below approach.
I do not want to use File > Choose File option. I would like to execute through newman and using File > Choose file option it is failing.
I tried to use below approach but it is giving 404 as response.
Body - Raw-->
{
"uploadType": "ORDER",
"headerIncluded":"false",
"file":"C:/Users/b3badm/Desktop/SIndoora/FileImport_ValidProducts.txt"
}
Upvotes: 5
Views: 16600
Reputation: 136
This option is hidden by default! Only move your cursor over the area will appear the Text for you to change to File! You should also put file or something in the key column.
Upvotes: 5
Reputation: 552
From the Postman GUI the only way to send a file is to add it as a form-data via File -> Select Files or Binary -> Select files.
If you want to execute such request via Newman you need to manually edit your collection.json file to add the full path to the file you're trying to send on your local machine in request.body.formdata.src
parameter.
More details can be found in Postman Blog.
Upvotes: 0