Only apply mimemagick fixes if it is defined which in the current situation is true for paperclip dependency
This commit is contained in:
@@ -76,6 +76,7 @@ module Dunlop
|
||||
|
||||
#FIXES
|
||||
|
||||
if defined?(MimeMagic)
|
||||
#A CSV FILE STARTING WITH MZ IS RECOGNIZED AS X-MS-DOS-EXECUTABLE
|
||||
# https://github.com/minad/mimemagic/issues/67
|
||||
if mime_magic_ms_dos_index = MimeMagic::MAGIC.index{|r| r == ['application/x-ms-dos-executable', [[0, 'MZ']]]}
|
||||
@@ -90,3 +91,4 @@ module Dunlop
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user