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 :<
You might be doing it right but sometimes POSTMAN does not work well. I wrote an API to accept both text and file.
While invoking service from Postman.
1. I set Content-Type as "application/json" and Accept as "application/json".
2. In body I pass the text and file
It was not working, I tried multiple time. I shut down post man and my laptop.
Woke up next morning hit again and it worked. Below is image of working request.
While using Postman
especially when you test file upload please ensure that,
Content-type
field has been set as multipart/form-data
in Headers.form-data
option should be remain as default.File
option instead of text
from dropdown at the right side.File
in text box where placeholder is key
.Hope this helps!