Skip to content

Commit

Permalink
rewind before generating fingerprint
Browse files Browse the repository at this point in the history
  • Loading branch information
Mankyu Han authored and Jon Yurek committed Jun 8, 2012
1 parent 3f48043 commit d699680
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/paperclip/io_adapters/stringio_adapter.rb
Expand Up @@ -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)
Expand Down

0 comments on commit d699680

Please sign in to comment.