Permalink
Browse files

Based on a patch, reset the size of the original attachment after pos…

…t_processing.
  • Loading branch information...
1 parent fd2333e commit 2d729bcc46ac6e987c5758a1ff6bd0886bca3816 @jyurek jyurek committed Sep 12, 2008
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/paperclip/attachment.rb
@@ -83,6 +83,9 @@ def assign uploaded_file
@dirty = true
post_process
+
+ # Reset the file size if the original file was reprocessed.
+ @instance[:"#{@name}_file_size"] = uploaded_file.size.to_i
ensure
validate
end

0 comments on commit 2d729bc

Please sign in to comment.