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

Check for a valid image file when uploading logo #3058

Closed
aydwi opened this issue Feb 22, 2018 · 0 comments · Fixed by #3057
Closed

Check for a valid image file when uploading logo #3058

aydwi opened this issue Feb 22, 2018 · 0 comments · Fixed by #3057

Comments

@aydwi
Copy link
Contributor

aydwi commented Feb 22, 2018

Bug

Description

In the journalist application, when the Admin uploads an image file for logo, no check is performed to determine if it is a valid image file, or a corrupted/unreadable one. The application currently only checks for a valid extension.

Thus if someone uploads a corrupt/unreadable or non-image file with an extension like JPG, JPEG or PNG, it gets updated and shows up like:

screenshot from 2018-02-22 19-43-45

Steps to Reproduce

Upload a non-image file with .png extension.

Expected Behavior

The image should be ignored and user should be prompted to upload again.

Actual Behavior

The incorrect image file gets uploaded.

Comments

As suggested by @heartsucker, I'll try to write a fix for this and integrate into #3057

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant