filestack / filestack-ruby

Official Ruby SDK for Filestack - API and content management system that makes it easy to add powerful file uploading and transformation capabilities to any web or mobile application.
https://www.filestack.com
Apache License 2.0
34 stars 27 forks source link

[fix] Handle nil mimetype of file #85

Closed tomaskubala closed 3 years ago

tomaskubala commented 3 years ago

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 commented 3 years ago

Coverage Status

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