Permalink
Browse files

rewind before generating fingerprint

  • Loading branch information...
Mankyu Han Jon Yurek
Mankyu Han authored and Jon Yurek committed May 25, 2012
1 parent 3f48043 commit d699680ed5a85aefb99b4721bbef9516b3b19bda
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/paperclip/io_adapters/stringio_adapter.rb
@@ -24,7 +24,10 @@ def size
end
def fingerprint
- Digest::MD5.hexdigest(read)
+ rewind # start reading from the beginning
+ finger = Digest::MD5.hexdigest(read)
+ rewind
+ finger
end
def read(length = nil, buffer = nil)

0 comments on commit d699680

Please sign in to comment.