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] Handle nil mimetype of file #85

Merged
merged 4 commits into from Jun 7, 2021
Merged

[fix] Handle nil mimetype of file #85

merged 4 commits into from Jun 7, 2021

Conversation

tomaskubala
Copy link
Contributor

@tomaskubala tomaskubala commented Jun 4, 2021

Fix #83

Handle nil value which is returned by MiniMime.lookup_by_filename(File.open(file)). The method content_type is calling every time. Calling content_type on nil is throwing Exception. This fix is handling content_type on nil value.

@coveralls
Copy link

coveralls commented Jun 4, 2021

Coverage Status

Coverage increased (+0.03%) to 96.66% when pulling 393557b on tomaskubala:contrib/83 into b07b20f on filestack:develop.

@tomaskubala tomaskubala marked this pull request as ready for review June 4, 2021 10:38
@gabifija gabifija merged commit ccdd038 into filestack:develop Jun 7, 2021
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.

NoMethodError when mime type is unknown
3 participants