insomnia icon indicating copy to clipboard operation
insomnia copied to clipboard

[Feature request] Select multiple Multipart files in one parameter

Open jvujjini opened this issue 7 years ago • 15 comments

  • Insomnia Version: 6.6.2 (6.6.2.2932)
  • Operating System: macOS Mojave 10.14.6 (18G87)

Details

I am trying to create a POST request with Multipart Form Body and uploading multiple files in the same key/value pair. Insomnia doesnt seem to allow me to select multiple files. I could successfully do it in another REST Client. Is this a limitation or am I doing it wrong?

Sample curl command :

curl -X POST \
 <url> \
 -H ‘cache-control: no-cache’ \
 -H ‘content-type: multipart/form-data; \
 -F =@<file1-location> \
 -F =@<file2-location> \
 -F =@<file3-location>

jvujjini avatar Aug 28 '19 21:08 jvujjini

Your Curl command is sending three files with no name for each. You can do the same thing in Insomnia like this:

image

gschier avatar Aug 29 '19 18:08 gschier

Hello @gschier, how do I do this using GraphQL? Thanks!

edilsoncichon avatar Oct 07 '19 14:10 edilsoncichon

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 06 '19 14:12 stale[bot]

Your Curl command is sending three files with no name for each. You can do the same thing in Insomnia like this:

image

Is it possible to send this files in one variable?

Olimovv avatar Mar 11 '20 06:03 Olimovv

To upload files in one variable Снимок экрана 2020-03-16 в 11 20 44

JuricT avatar Mar 16 '20 09:03 JuricT

Sorry if I allow myself @JuricT , but the correct way is: immagine

Thanks

JuMp3 avatar Mar 19 '20 18:03 JuMp3

I think this might depend on the server-side technologies used. I'm using Express.js and multer to handle multipart/form-data requests. The only format that doesn't induce MulterError: Unexpected field is multiple entries with the same name without any brackets.

image

weeix avatar Apr 13 '20 09:04 weeix

@weeix your way is right when useing express.js and multer!

heavenkiller2018 avatar Nov 11 '20 11:11 heavenkiller2018

@weeix It works perfectly with Spring also

multtiplefiles

Multipart[] or File Array can be called this way using the same attribute name in insomnia.

nrjac avatar Jan 04 '21 06:01 nrjac

@weeix It works perfectly with Spring also

multtiplefiles

Multipart[] or File Array can be called this way using the same attribute name in insomnia.

This is also working fine for me.

cuongmanhvo162 avatar Apr 27 '21 14:04 cuongmanhvo162

image

For the 3 people that use Insomnia to test their APIs in Go, this works for me.

soumitradev avatar May 19 '21 14:05 soumitradev

Shouldn't we have the ability to allow for multiple file section? It is a bit annoying to have to use the same key and keep selecting each file for it. We can just do multi file selection.

prodoxx avatar Nov 20 '21 18:11 prodoxx

Sorry, I appreciate this is an open-source tool and I am grateful for the options already provided by Insomnia. However, manually selecting files makes no sense when one needs to send 1000 files??? In addition, multi-file selection is possible in Postman so why should we not make this possible in Insomnia?

maxruby avatar Dec 05 '21 12:12 maxruby

I face error when i try to upload multiple file in insomnia, i am using multer and express.js. I have set multer().array('upload',20). But i am facing MulterError: Unexpected field.

sahooch avatar Jan 18 '22 19:01 sahooch

Postman solve this perfect. 11 Files, one line. I use Postman for file-upload until Insomnia work out a similar solution. For my other endpoints Insomnia work great. Its less verbose and easier for hobby APIs. In my webdev course we learned that the human eye is most comfortable focusing on 7 items at once. I think Postman missed that memo.

Screenshot 2022-02-04 122152

ghost avatar Feb 04 '22 11:02 ghost