Guest User

Untitled

a guest
Feb 20th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. Index: lib/technoweenie/acts_as_attachment.rb
  2. ===================================================================
  3. --- lib/technoweenie/acts_as_attachment.rb (revision 1576)
  4. +++ lib/technoweenie/acts_as_attachment.rb (working copy)
  5. @@ -369,7 +369,7 @@
  6. # TODO Convert to streaming storage to prevent excessive memory usage
  7. # FileUtils.copy_stream is very efficient in regards to copies
  8. # OR - get the tmp filename for large files and do FileUtils.cp ? *agile*
  9. - File.open(full_filename, "w") do |file|
  10. + File.open(full_filename, "wb") do |file|
  11. file.write(attachment_data)
  12. end
  13. end
Add Comment
Please, Sign In to add comment