I'm adding RESTFull api to my site, and i need to update my tools, where are pictures witch need to be updated too. My problem is like that for PUT request
/**
* @Rest\Put("/tools/{id}")
*
* @param Request $request
*/
public function editToolAction($id, Request $request)
symfony is only parsing data with Content_type
application/x-www-form-urlencoded
, so i can get it from request, and this is working for strings etc.
$parameters = $request->request->all();
but to send files i need header to be:
content-type:"multipart/form-data; boundary....
$parameters = $request->request->all();
$files = $request->files->all();
but for multipart header i'm getting nulls for both parameters
and files
for @Rest\POST this is working perfectly
im not working on client side so i can't change request from PUT to POST, any ideas how to fix it ?
site is using symfony 3.4. , php 7.2. , FOSRestBundle, FOSOAuthBundle,.... to check if it is working Postman was used