lenra-io / server

GNU Affero General Public License v3.0
6 stars 0 forks source link

[Task] Add checks on logo upload #525

Open jonas-martinez opened 6 months ago

jonas-martinez commented 6 months ago

What should be done

We should add some checks on the logo upload feature. We need to make sure that the developer cannot add enormous logos. We might want to add an environment variable for that, so that it is possible to change the value of accepted logo size. Add some error handling in case the logo is overweight.

Be careful because there is already a limit in file upload that applies to all types of files, even images. So if you try to set the max size for an image over this global limit, it might not be able to go over the global limit at upload.

Ecological concerns

We might want to change the way we store the logos because it can become really heavy to do this in postgres (particularly for backups). But this is a problem for another issue 😄