diff options
author | Takeshi Umeda <noel.yoshiba@gmail.com> | 2020-07-19 20:09:47 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-19 13:09:47 +0200 |
commit | 101485a41fb2ea326496142d9ccb368522cbe0f0 (patch) | |
tree | 628a90da9eb85d6d085cd7c71973c3acbc4767a7 /lib | |
parent | a29080256ecb39c7c719a7717fa15d3bc6d9776b (diff) |
Fix mimetype returning nil (#14356)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/paperclip/media_type_spoof_detector_extensions.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/paperclip/media_type_spoof_detector_extensions.rb b/lib/paperclip/media_type_spoof_detector_extensions.rb index 363934d8d..43337cc68 100644 --- a/lib/paperclip/media_type_spoof_detector_extensions.rb +++ b/lib/paperclip/media_type_spoof_detector_extensions.rb @@ -18,7 +18,7 @@ module Paperclip @type_from_mime_magic ||= begin begin File.open(@file.path) do |file| - MimeMagic.by_magic(file)&.type + MimeMagic.by_magic(file)&.type || '' end rescue Errno::ENOENT '' |