Skip to content

Conversation

@SegiNyn
Copy link
Contributor

@SegiNyn SegiNyn commented Sep 9, 2024

Unfortunately, there was an issue with the MAX_UPLOAD_FILE_SIZE check validation workflow for the picture field.
Example scenario: if the MAX_UPLOAD_FILE_SIZE is set as 12MB, when an image less than 12MB but still large e.g 11MB is uploaded into the dropzone then it is accepted and then goes through the cropper which ends up returning an image that may be larger than the 12MB, especially if the original image was .png. When this image is checked again at def validate_upload_file_size, the validation then fails.

This issue with the cropped image being bigger is mention in the cropper library with a workaround https://github.com/fengyuanchen/cropperjs?tab=readme-ov-file#known-issues

@SegiNyn SegiNyn marked this pull request as ready for review September 9, 2024 14:59
@ThiefMaster ThiefMaster added this to the v3.3 milestone Sep 10, 2024
@ThiefMaster ThiefMaster enabled auto-merge (squash) September 10, 2024 15:10
@ThiefMaster ThiefMaster merged commit f58c6c7 into indico:master Sep 10, 2024
@ThiefMaster ThiefMaster deleted the picture-field-fixes branch September 10, 2024 15:16
SegiNyn added a commit to UNOG-Indico/indico-core that referenced this pull request Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants