Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: lib/technoweenie/acts_as_attachment.rb
- ===================================================================
- --- lib/technoweenie/acts_as_attachment.rb (revision 1576)
- +++ lib/technoweenie/acts_as_attachment.rb (working copy)
- @@ -369,7 +369,7 @@
- # TODO Convert to streaming storage to prevent excessive memory usage
- # FileUtils.copy_stream is very efficient in regards to copies
- # OR - get the tmp filename for large files and do FileUtils.cp ? *agile*
- - File.open(full_filename, "w") do |file|
- + File.open(full_filename, "wb") do |file|
- file.write(attachment_data)
- end
- end
Add Comment
Please, Sign In to add comment