Send file with postman to Laravel API Send file with postman to Laravel API laravel laravel

Send file with postman to Laravel API


If you want to test file uploads with Postman and Laravel, simply remove the Content-Type header setting in Postman.


If you send request to upload a file form Postman you should include in the postman also a header Content-Type: multipart/form-data and select form-data, there the field should be file and not text . Also be careful only with POST you can make file upload with PUT and PATCH it doesn't function.


When choosing "form-data" in PostMan, it automatically sets a header "Content-Type: application/x-www-form-urlencoded".

I just removed the header, and everything worked :)