rodber / chevereto-free

👉 Go to chevereto/chevereto for newer Chevereto releases. Self-hosted image sharing software, your own Flickr/Imgur with your very own rules.
https://github.com/chevereto/chevereto
GNU Affero General Public License v3.0
2.77k stars 500 forks source link

Image upload size limit ignores php.ini settings #53

Closed brentkearney closed 4 years ago

brentkearney commented 4 years ago

Hello,

I'm running Chevereto-Free from the docker image, and added a custom php.ini to increase the file upload size limits. I set:

upload_max_filesize = 100M;
post_max_size = 100M;
max_execution_time = 120;
memory_limit = 512M;

When I login as the admin user, and go to the Dashboard, these settings are reflected in the information displayed there. However, when I attempt to upload a photo over 2MB in size, there is a white banner at the top of the page, with JPG PNG BMP GIF 2 MB in the top-left corner, and the upload fails with the message, "DSC09008.JPG - File too big.".

Where else should the file size limits be set?

Many thanks

brentkearney commented 4 years ago

I have seen it suggested in the forums that there is also a file size limit in the Admin panel -> Settings. I do not see that setting. Perhaps it was removed, at some point?

brentkearney commented 4 years ago

Found it! The settings are stored in the database. Unfortunate there is no UI for updating them. Hopefully this info helps someone else confused by this problem.

mysql> select setting_name, setting_value from chv_settings where setting_name LIKE "%size%";
+---------------------------------------+---------------+
| setting_name                          | setting_value |
+---------------------------------------+---------------+
| upload_max_filesize_mb                | 100           |
| user_image_avatar_max_filesize_mb     | 5             |
| user_image_background_max_filesize_mb | 5             |
| upload_medium_size                    | 500           |
| image_load_max_filesize_mb            | 100           |
| upload_max_filesize_mb_guest          | 5             |
+---------------------------------------+---------------+