Commit b255f338 by Larry Sprock

Fix Ruby 1.9.2 'Encoding::UndefinedConversionError: \xA3 from ASCII-8BIT to UTF-8' in S3.to_file

parent 001f6721
...@@ -131,6 +131,7 @@ module Paperclip ...@@ -131,6 +131,7 @@ module Paperclip
extname = File.extname(filename) extname = File.extname(filename)
basename = File.basename(filename, extname) basename = File.basename(filename, extname)
file = Tempfile.new([basename, extname]) file = Tempfile.new([basename, extname])
file.binmode
file.write(AWS::S3::S3Object.value(path(style), bucket_name)) file.write(AWS::S3::S3Object.value(path(style), bucket_name))
file.rewind file.rewind
return file return file
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment