filename = '../static/tmpImg/6.jpg'
if (filename):
print(filename)
fp = open(filename, 'rb')
contents = fp.read()
fp.close()
print(hashlib.md5(contents).hexdigest())
else:
print('file not exists')
pyhon取文件md5值
于 2021-08-18 00:54:46 首次发布