文件上传

chromesetting
daiao 5 years ago
parent c1973afc52
commit c90b05049b

@ -1105,4 +1105,16 @@ private
ext
end
def delete_file(file_path)
File.delete(file_path) if File.exist?(file_path)
end
def md5_file(temp_file)
md5 = Digest::MD5.new
temp_file.rewind
while (buffer = temp_file.read(8192))
md5.update(buffer)
end
md5.hexdigest
end
end

Loading…
Cancel
Save