Check for nil paths on MIME check
This commit is contained in:
parent
406c2e6a01
commit
b5d03d0be7
|
@ -54,6 +54,7 @@ module CouchRest
|
|||
private
|
||||
|
||||
def get_mime_type(path)
|
||||
return nil if path.nil?
|
||||
type = ::MIME::Types.type_for(path)
|
||||
type.empty? ? nil : type.first.content_type
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue