mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00:00
remove spaces inside {} of lib/redmine/thumbnail.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@20371 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
b95131d756
commit
de8d7aeb85
@ -34,13 +34,13 @@ module Redmine
|
||||
return nil if is_pdf && !gs_available?
|
||||
|
||||
unless File.exists?(target)
|
||||
mime_type = File.open(source) {|f| MimeMagic.by_magic(f).try(:type) }
|
||||
mime_type = File.open(source) {|f| MimeMagic.by_magic(f).try(:type)}
|
||||
return nil if mime_type.nil?
|
||||
return nil if !ALLOWED_TYPES.include? mime_type
|
||||
return nil if is_pdf && mime_type != "application/pdf"
|
||||
|
||||
# Make sure we only invoke Imagemagick if the file type is allowed
|
||||
unless File.open(source) {|f| ALLOWED_TYPES.include? MimeMagic.by_magic(f).try(:type) }
|
||||
unless File.open(source) {|f| ALLOWED_TYPES.include? MimeMagic.by_magic(f).try(:type)}
|
||||
return nil
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user