Commit d699680e by Mankyu Han Committed by Jon Yurek

rewind before generating fingerprint

parent 3f480438
...@@ -24,7 +24,10 @@ module Paperclip ...@@ -24,7 +24,10 @@ module Paperclip
end end
def fingerprint def fingerprint
Digest::MD5.hexdigest(read) rewind # start reading from the beginning
finger = Digest::MD5.hexdigest(read)
rewind
finger
end end
def read(length = nil, buffer = nil) def read(length = nil, buffer = nil)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment