Skip to content

Commit c7311b5

Browse files
committed
When attachement has been saved in S3, read bytes for mime_magic
This is to retain compatability with mimemagic 0.3.3, which changed behavior, expecting anything with a read method to accept a buffered read request.
1 parent 1282801 commit c7311b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/uploaders/asset_uploader.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def mime_type(file)
5151
when CarrierWave::SanitizedFile
5252
file.to_file
5353
when CarrierWave::Storage::Fog::File
54-
CarrierWave::Storage::Fog.new(self).retrieve!(File.basename(file.path))
54+
file.read
5555
else
5656
open(file)
5757
end

0 commit comments

Comments
 (0)