andrii-kryvoviaz / slink

Self-hosted image sharing service.
GNU Affero General Public License v3.0
313 stars 9 forks source link

[ Feature Request ] Add ENV flag to customize upload size limit. #6

Closed arpanghosh8453 closed 7 months ago

arpanghosh8453 commented 8 months ago

Currently, users cannot upload files larger than 5 MB and that is not customizable. Is it possible to add an ENV flag for this so we can customize that when spinning up the docker container?

andrii-kryvoviaz commented 8 months ago

That what I was thinking too. Should be definitaly included somewhere in the next builds.

arpanghosh8453 commented 8 months ago

Perfect! Thank you again for considering my ideas :)

andrii-kryvoviaz commented 7 months ago

Added support for configurable upload size in cceb639 and will be a part of the next release.

The only thing, it will still have a hard limit, which is determined by PHP configuration (currently 50M). It is assiged at the image building step. Theoretically, new configuration files could be mounted onto a container, to overcome the limit, but I don't think that someone will need to do so, since 50M is enough for 99% cases.

I could possibly make a bash script wich will update the configuration based on the ENV variables on container start, but this will overcomplecate things, as I will sooner or later make all the settings configurable form the web interface as well.