[solved]Uploading files bigger than 2Mb in Contao 3.0
Hello to everybody,
I'm trying to upload a file bigger than 2Mb in Contao 3.0. I changed the value of the MAX_UPLOAD_SIZE key in php.ini and added new new keys in this way:
post_max_size = 256M
upload_max_filesize = 256M
max_execution_time = 1000
max_input_time = 1000
Although I did this I'm surprised I still get the "The maximum size for file uploads is 2.0 MB (Contao or php.ini settings)!" error and I wonder why. Can you tell me something about this?
Thank you
Re: Uploading files bigger than 2Mb in Contao 3.0
Did you also set the Contao setting "Maximum upload file size" to a setting larger then 2048000? And you are sure that you can set the php.ini and this setting is correct? Can other scripts upload larger files then 2Mb?
The contao setting can be made in the backend settings, or manually in the localconfig.php file:
Code:
$GLOBALS['TL_CONFIG']['maxFileSize'] = 2048000;
Re: Uploading files bigger than 2Mb in Contao 3.0
Great, it worked!
I didn't know I could add the 'maxFileSize' parameter to Contao itself. It's funny that changing it into php.ini is not enough.
Anyway, thank you very very much, I hope this is going to be usefule to somebody else in the future!