Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix all issues with image formats & add tests #847

Open
abandoned-prototype opened this issue Oct 27, 2020 · 1 comment
Open

Fix all issues with image formats & add tests #847

abandoned-prototype opened this issue Oct 27, 2020 · 1 comment

Comments

@abandoned-prototype
Copy link
Collaborator

Recently we had problems with certain image-types not being recognized by imghdr.what which leads to errors, because we use that function extensively before uploading the image to S3. Additionally we also have an ALLOWED_EXTENSION config, which controls what image filename extensions are allowed when uploading an image.
Unfortunately it seems that #807 wasn't able to fix all the problems since we use the imghdr.what in a lot of places. So I think we need to come up with a solution that brings our logic on which image-types are allowed and how they are determined into one place.
Further, we need to write tests with a number of test-images to make sure things aren't breaking again as already pointed out by @redshiftzero in #807 (review)

@abandoned-prototype
Copy link
Collaborator Author

We should consider #369 and the related PR #691 as part of this issue. Ideally incorporate that PR into this work as well

@michplunkett michplunkett self-assigned this Jun 26, 2023
@michplunkett michplunkett removed their assignment Sep 16, 2023
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

No branches or pull requests

2 participants