Fix missing hashlib import in download route

This commit is contained in:
Aaron D. Lee
2026-01-04 20:49:11 -05:00
parent 5501c7e0ba
commit 5891285493

View File

@@ -1101,6 +1101,7 @@ def encode_download(file_id):
file_info = TEMP_FILES[file_id] file_info = TEMP_FILES[file_id]
mime_type = file_info.get("mime_type", "image/png") mime_type = file_info.get("mime_type", "image/png")
import hashlib
download_hash = hashlib.md5(file_info["data"]).hexdigest()[:8] download_hash = hashlib.md5(file_info["data"]).hexdigest()[:8]
print(f"[DOWNLOAD] stego: {len(file_info['data'])} bytes, md5: {download_hash}", file=sys.stderr) print(f"[DOWNLOAD] stego: {len(file_info['data'])} bytes, md5: {download_hash}", file=sys.stderr)