I am trying to add my postman scripts to an azure pipeline. To do this I am trying out newman. I use the postman api to get the latest collection as well as the correct environment. Using the uid and an api key i have created. All good so far. However my collection includes some calls that do file uploads. In postman i tested those by simply selecting the body of the call, selecting form-data and choosing a sample file that is located in the default "postman files" folder.
When testing newman on my local machine, i need to copy all the sample files i want to use for uploads into the same folder that i run newman from.
This solution is not quite right for me though as i use the postman api to get the correct collections and the environments. I need to be able to get those files also from an alternative remote location (such as azure blob storage)
I have found some guides that describe how you can just edit the postman collection file to point the "src" to a remote file. However i cannot find any way to do this directly in postman, in such a way that when newman gets the collection file from the api the correct location is already in the correct place.
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "files",
"type": "file",
"src": "sample.pdf"
}
]
},
Above is the extract from the collection file.
Is there a way i can make that change directly in postman?