lib/carrierwave/sanitized_file.rb in carrierwave-2.2.5 vs lib/carrierwave/sanitized_file.rb in carrierwave-2.2.6
- old
+ new
@@ -322,10 +322,10 @@
return name.mb_chars.to_s
end
def existing_content_type
if @file.respond_to?(:content_type) && @file.content_type
- @file.content_type.to_s.chomp
+ Marcel::MimeType.for(declared_type: @file.content_type.to_s.chomp)
end
end
def marcel_magic_content_type
if path