Permalink
Browse files

Fix for "Encoding::UndefinedConversionError: "\xA3" from ASCII-8BIT t…

…o UTF-8" on S3 to_file
  • Loading branch information...
1 parent ef2e871 commit 0ab7413d260efab88a603e2b1ef9c9cb1070a053 @ernie committed Jul 9, 2010
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/paperclip/storage.rb
View
@@ -194,6 +194,7 @@ def s3_protocol
def to_file style = default_style
return @queued_for_write[style] if @queued_for_write[style]
file = Tempfile.new(path(style))
+ file.binmode
file.write(AWS::S3::S3Object.value(path(style), bucket_name))
file.rewind
return file

0 comments on commit 0ab7413

Please sign in to comment.