I've sent an image from client side(Angular) to symfony. The upload works fine with small size images but when I try to upload a big size one (more than 2.0 mb) it does not work and shows me this error:
The "" file does not exist or is not readable. in vendor/symfony/mime/FileinfoMimeTypeGuesser.php (line 52)
$data = json_decode($request->getContent(), true);
$uploadedImage=$request->files->get('mainIMG');
/**
* @var UploadedFile $image
*/
$image=$uploadedImage;
$imageName=md5(uniqid()).'.'.$image->guessExtension();
$image->move($this->getParameter('avatar_dir'),$imageName);