Closed EmberHeartshine closed 6 months ago
I found the appropriate Caddy directive; I don't know how you'd make that configurable at runtime but it's something at least.
Ensure you update your php.ini to prevent an entity too large error from popping up as well as the default php upload is I think 2M or 10M?
Lines to edit in php.ini upload_max_filesize = 10M (set to expected file size) post_max_size = 10M (set to expected file size)
I don’t think this is configurable via a webpage unless a installer / setup is created where all packages are installed then a page is created where you can set your values per certain packages during that web installation prior to production. Other than that this is something that would need to be manually configured.
Since this is a Docker image it is preferable for this to be configurable using files that will be persistent, which php.ini is not. Nor should system/uid 0-owned files be bind mounted.
Since this is a Docker image it is preferable for this to be configurable using files that will be persistent, which php.ini is not. Not should system/uid 0-owned files be bind mounted.
Ah I thought you had this separated from docker based on another issue posted.
See these, might be of use.
https://stackoverflow.com/questions/63072249/docker-compose-set-variable-in-php-ini-from-dockerfile
https://forums.docker.com/t/how-to-get-access-to-php-ini-file/68986
Those are still not persistent fixes. Re-downloading the image (for updates etc) doesn't save that config. I'm trying to suggest a more user-friendly approach to this, and editing docker-compose files is not that.
Adding these lines to a .ini file like in this docker file should work
Just added this capability, it is currently available on the main branch, will be delivering it with the 1.10 release in the next few minutes.
Not fixed. My .env file was updated with the following lines:
PHP_UPLOAD_MAX_FILESIZE=16M
PHP_POST_MAX_SIZE=64M
and when I attempt to upload an image larger than 2 MB, I get the following error:
Still not fixed. The PHP_POST_MAX_SIZE
and PHP_UPLOAD_MAX_FILESIZE
envvars still aren't being respected. I cannot upload anything larger than ~8 MB, since that results in the error below. Attempting to upload anything between 5 MB and 8 MB results in the same error I got in the previous comment. My vars are unchanged from the previous comment.
After experimenting a little with various files, it looks like 2 MB is the maximum upload size. I'd like that to be configurable, though I didn't see where in the code that's actually defined (so I could be mistaken). I've made sure my nginx reverse proxy is set to accept client body sizes larger than that.