Skip to content

Commit

Permalink
Use Marcel::Magic.new instead of private constant
Browse files Browse the repository at this point in the history
  • Loading branch information
schinery committed Mar 1, 2024
1 parent 264410f commit f06679e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/carrierwave/downloader/remote_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def headers

def original_filename
filename = filename_from_header || filename_from_uri
extensions = Marcel::TYPE_EXTS[content_type]
extensions = Marcel::Magic.new(content_type).extensions
unless File.extname(filename).present? || extensions.blank?
extension = extensions.first
filename = "#{filename}.#{extension}"
Expand Down

0 comments on commit f06679e

Please sign in to comment.