mediacms icon indicating copy to clipboard operation
mediacms copied to clipboard

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

Open mprajescu opened this issue 4 years ago • 3 comments

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

image

mprajescu avatar Jan 11 '21 22:01 mprajescu

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

mgogoulos avatar Jan 12 '21 19:01 mgogoulos

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?

swiftugandan avatar Mar 12 '21 21:03 swiftugandan

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 !)

mgogoulos avatar Mar 17 '21 09:03 mgogoulos