3

Im trying to upload file to a Symfony app, then retrieve the file from the ParamFetcher of FosRestBundle, finally create a SonataMedia object with the uploaded file.

Im stuck on how to upload the file. The entire application has been developed using Postmans POST, GET, DELETE, etc functions for testing right until now.

If already tested as shown in the picture, simply doing a POST with de param file having the image file selected. ParamFetcher is not detecting the param and returns error message saying file is null.

Postman screenshot here

nachocifu
  • 100
  • 4
  • Do you mean doing the request from Postman does not show the uploaded file? You can probably debug by checking the $_FILES array in Symfony. It might be that the ParamFetcher is looking for the wrong name. – mickadoo Feb 16 '17 at 11:26

0 Answers0