about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/paperclip/media_type_spoof_detector_extensions.rb2
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
           ''