# File lib/paperclip/attachment.rb, line 295 def generate_fingerprint(source) if source.respond_to?(:path) && source.path && !source.path.blank? Digest::MD5.file(source.path).to_s else data = source.read source.rewind if source.respond_to?(:rewind) Digest::MD5.hexdigest(data) end end