mediacms-io / mediacms

MediaCMS is a modern, fully featured open source video and media CMS, written in Python/Django and React, featuring a REST API.
https://mediacms.io
GNU Affero General Public License v3.0
2.7k stars 498 forks source link

[Improvement] Allow bigger files for upload for users profile picture #18

Closed mprajescu closed 1 year ago

mprajescu commented 3 years ago

Where can you allow larger files to be uploaded? Cannot add profile pictures for users more than 2 mb.

image

mgogoulos commented 3 years ago

I've slightly changed the title, because this only refers to user image. This is 2mb now indeed but it could be another configuration option

swiftugandan commented 3 years ago

Good first issue for anyone wanting to contribute, https://github.com/mediacms-io/mediacms/blob/87539eb8efb58fa2d0b200d5016c9b6b6ca5d642/users/forms.py#L32

@mgogoulos What max size should we allow?

mgogoulos commented 3 years ago

2MB limit for user profile is set, since the image gets re scaled anyway on 200x200 (check users.models.User.logo) at some point it would be handy to add option to select a section from an uploaded image, but that's a different issue.

For this one here, indeed a check could be towards a variable set on cms/settings.py (eg USER_PROFILE_PICTURE_SIZE), which would have the default 2MB limit but make it easy for users to override (nice suggestion @swiftugandan !)