How to send multiple files in postman ReSTful web service?

前端 未结 5 1942
感动是毒
感动是毒 2021-01-01 09:00

I am using ReSTful webservice. I am uploading multiple photos with one function (PHP).

I have used $num_files = count($_FILES[\'myfile\'][\'name\']) to

相关标签:
5条回答
  • 2021-01-01 09:14

    Yeah,last version of postman made a bad update.

    But, you can download the chrome extensions of postman and send multiple files with it, it still works there.

    Edit: I just checked now, they brought it back, but you have to reenter the key value for files if you made them with the chromium version.

    But now it works fine.

    0 讨论(0)
  • 2021-01-01 09:22

    Update 2020 Postman

    You don't need to add [ ] just put the param name and select files.

    0 讨论(0)
  • 2021-01-01 09:26

    You can simple add multiple lines with same key and postman converts them to array. No need to add [] as suffix to key.

    Request

    Response

    If you have an array objects that need to passed then follow below pattern

    0 讨论(0)
  • 2021-01-01 09:30

    You need to add a square bracket [] sign to the parameter. Look at the following image. I add file[] to upload multiple images from the postman.

    0 讨论(0)
  • 2021-01-01 09:34

    I got a solution. I need to make myfile an array like this: myfile[] :)

    0 讨论(0)
提交回复
热议问题