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.
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.
Coverage increased (+0.03%) to 96.66% when pulling 393557b8be229213d3f63daa8bc055ace83d31fc on tomaskubala:contrib/83 into b07b20f39fe417e36b3defdbc22d961d607a6de3 on filestack:develop.
Fix #83
Handle
nil
value which is returned byMiniMime.lookup_by_filename(File.open(file))
. The methodcontent_type
is calling every time. Callingcontent_type
onnil
is throwingException
. This fix is handlingcontent_type
onnil
value.