Upload large files in backend

Hello everyone, good day.

I am working with the backend of OctoberCMS 3 and I have come across something that I do not understand.

When uploading files to the backend, it does not allow files larger than 2 MB. I understand this is a limitation of PHP due to the values of post_max_size and upload_max_filesize, but this doesn’t make much sense to me because these values should not need to be modified to upload larger files given that there is chunked uploading technology where each packet sent is small, and on the server, the uploaded file is reconstructed. In this way, a file that is 10 megabytes can be uploaded as 10 posts of one megabyte each.

Is there something that needs to be configured in OctoberCMS for file uploads in the backend to work in chunks?

Thanks! Happy monday

2 Likes

Hi @sanPuerquitoPrograma

Happy Monday! :slight_smile:

The limit is currently based on Symfony\Component\HttpFoundation\File\UploadedFile::getMaxFilesize()

Chunked file uploads are a great idea to overcome this limitation. As a workaround, it is indeed to increase the PHP Setting. Keep in mind a limit is always needed to control possible DOS vectors.