Upload a file with PUT/POST method on POSTMAN

后端 未结 2 1517
一整个雨季
一整个雨季 2021-02-14 05:33

I am trying to upload a file with POSTMAN to this url

http://localhost:3000/bucket/test/files/

And should got result in my controller there :<

2条回答
  •  你的背包
    2021-02-14 06:14

    While using Postman especially when you test file upload please ensure that,

    1. in Headers:
      • The Content-type field has been set as multipart/form-data in Headers.
    2. in Body:
      • form-data option should be remain as default.
      • Choose File option instead of text from dropdown at the right side.
      • Type File in text box where placeholder is key.

    Hope this helps!

提交回复
热议问题