Error uploading large files #893

Closed
opened 2026-02-04 22:45:21 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @RicardoPires19 on GitHub (Nov 4, 2018).

Describe the bug
When I try to upload files as attachments that are 3MB or larger they generate an exception "validation.uploaded". From the debug tool it seems that a ValidationException gets thrown.

Steps To Reproduce
Steps to reproduce the behavior:
Create a new Ubuntu 18.04 virtual machine
sudo apt-get install mysql-server-5.7
wget https://raw.githubusercontent.com/BookStackApp/devops/master/scripts/installation-ubuntu-18.04.sh
chmod a+x installation-ubuntu-18.04.sh
sudo ./installation-ubuntu-18.04.sh
Create a new book
Create a new page
Upload a file that is around 3MB or bigger and the error should appear.

Expected behavior
The files should be uploaded normally without any problems since I've updated the /cli/php.ini and /fpm/php.ini to allow files up to 40MB. The memory limit is set at 128MB.

Screenshots

image

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): v0.24.1
  • PHP Version: 7.2
  • Hosting Method: Apache

Additional context
I've tried multiple ways to resolve this problem, but I've been unsuccessful. I've set the storage folder and the folders inside to have all the permissions available to anyone but the problem still persists. I also can't see the logs in the storage/logs

Originally created by @RicardoPires19 on GitHub (Nov 4, 2018). **Describe the bug** When I try to upload files as attachments that are 3MB or larger they generate an exception "validation.uploaded". From the debug tool it seems that a ValidationException gets thrown. **Steps To Reproduce** Steps to reproduce the behavior: Create a new Ubuntu 18.04 virtual machine sudo apt-get install mysql-server-5.7 wget https://raw.githubusercontent.com/BookStackApp/devops/master/scripts/installation-ubuntu-18.04.sh chmod a+x installation-ubuntu-18.04.sh sudo ./installation-ubuntu-18.04.sh Create a new book Create a new page Upload a file that is around 3MB or bigger and the error should appear. **Expected behavior** The files should be uploaded normally without any problems since I've updated the /cli/php.ini and /fpm/php.ini to allow files up to 40MB. The memory limit is set at 128MB. **Screenshots** ![image](https://user-images.githubusercontent.com/7210193/47958107-1d1bb180-dfbc-11e8-873f-0de058c3b8f6.png) **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings): v0.24.1 - PHP Version: 7.2 - Hosting Method: Apache **Additional context** I've tried multiple ways to resolve this problem, but I've been unsuccessful. I've set the storage folder and the folders inside to have all the permissions available to anyone but the problem still persists. I also can't see the logs in the storage/logs
OVERLORD added the 🐕 Support label 2026-02-04 22:45:21 +03:00
Author
Owner

@RicardoPires19 commented on GitHub (Nov 4, 2018):

I've managed to fix the problem. Apparently there was also a third php.ini file in php/7.2/apache2/ after I changed that one the server now accepts files of bigger sizes.

@RicardoPires19 commented on GitHub (Nov 4, 2018): I've managed to fix the problem. Apparently there was also a third php.ini file in php/7.2/apache2/ after I changed that one the server now accepts files of bigger sizes.
Author
Owner

@ssddanbrown commented on GitHub (Nov 4, 2018):

@RicardoPires19 Thanks for confirming you managed to find a fix. Will close this.

@ssddanbrown commented on GitHub (Nov 4, 2018): @RicardoPires19 Thanks for confirming you managed to find a fix. Will close this.
Author
Owner

@kobaz commented on GitHub (Dec 9, 2025):

I fixed my issue (Being unable to upload 1G+ files, even though
LimitRequestBody 0
upload_max_filesize 4G
post_max_size 4G

My /tmp was too small (only 768MB)

I up-sized my /tmp to 4G and we're rocking large file uploads.

@kobaz commented on GitHub (Dec 9, 2025): I fixed my issue (Being unable to upload 1G+ files, even though LimitRequestBody 0 upload_max_filesize 4G post_max_size 4G My /tmp was too small (only 768MB) I up-sized my /tmp to 4G and we're rocking large file uploads.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#893