Skip to content

Conversation

@schmiddim
Copy link

I created a more simple fix for #46
every lib fails with mime type application/octet-stream so it now guesses by extension.

Cheers and thanks for your awesome code!

self.media_ext = ext.extension

def is_image(self):
return True if self.media_ext in ['jpg', 'png', 'gif'] else False
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will fail on .jpeg filetypes if using the fallback. Could do this:

Suggested change
return True if self.media_ext in ['jpg', 'png', 'gif'] else False
return True if self.media_ext in ['jpg', 'jpeg', 'png', 'gif'] else False

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.

2 participants