5

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.

  1. From Body - Form data - Type as Text approach
  2. How I can upload file using Body - raw - Json file type

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"
}
2

2 Answers 2

5

img

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.

Sign up to request clarification or add additional context in comments.

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.