30

I'm having problem posting binary data and regular data at the same time.

How I can test it with Insomnia? Insomnia offers only URL Encoded for data and Binary File for file. I cannot send both at the same time.

What should I do to test uploading data and binary file at the same time with one request?

Thomas W
  • 14,757
  • 6
  • 48
  • 67
anduplats
  • 885
  • 2
  • 14
  • 24
  • 1
    could you check this question and accept the correct answer? its for the community [help/someone-answers](https://stackoverflow.com/help/someone-answers) – buncis Jan 05 '21 at 07:14
  • why did you chose byte, not Multipart ? – Rajanboy Jul 09 '22 at 15:34

2 Answers2

63

you could use multipart form from insomnia with this you could send data and file at the same request

enter image description here

buncis
  • 2,148
  • 1
  • 23
  • 25
21
  1. Choose Multipart Form enter image description here

  2. Enter the name of the param (ex. image) and for the value, at the end you have a dropdown, choose File enter image description here

BONUS:

If you want to upload multiple files, you just need to put the same name of the param. enter image description here

Sorin Veștemean
  • 1,772
  • 19
  • 17