I am out of explanation for the apparently very basic problem of "The file is too large. Allowed maximum size is 2097152 bytes." on Symfony.
In my php.ini, I have set the 'upload_max_filesize' to '512M' and the 'post_max_size' to '1024M'.
In my entity for which i am trying to upload this file, i have set the 'maxSize' assert attribute like this:
/**
* @ORM\Column(type="string", length=255)
*
* @Assert\File(
* maxSize = "1024M",
* mimeTypes = {"application/xml"}
* )
*/
private $fileName;
When i remove the 'maxSize' attribute in my entity, the message only changes to "The file is too large. Allowed maximum size is 2 MiB."
The file i am trying to upload is 7,203Ko It works nicely when i upload a file inferior to 2Mo.
Any idea?
phpinfo();
that your php.ini working and your changes initialized on there? – bl4cksta