Skip to content
Browse files

Fix Ruby 1.9.2 'Encoding::UndefinedConversionError: \xA3 from ASCII-8…

…BIT to UTF-8' in S3.to_file
  • Loading branch information...
1 parent 001f672 commit b255f3389e4710e51fc42edc891552e9681f6b7e @lardawge lardawge committed Nov 9, 2010
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/paperclip/storage/s3.rb
View
1 lib/paperclip/storage/s3.rb
@@ -131,6 +131,7 @@ def to_file style = default_style
extname = File.extname(filename)
basename = File.basename(filename, extname)
file = Tempfile.new([basename, extname])
+ file.binmode
file.write(AWS::S3::S3Object.value(path(style), bucket_name))
file.rewind
return file

0 comments on commit b255f33

Please sign in to comment.
Something went wrong with that request. Please try again.