1
0

fix: forgot to store file hash

This commit is contained in:
2025-08-04 11:54:48 +09:00
parent 6b5477e1eb
commit 6987c26b11

View File

@@ -217,7 +217,9 @@ class Scraper(ClientSession):
attachment.source_filename = response.content_disposition.filename attachment.source_filename = response.content_disposition.filename
attachment.source_suffix = Path(attachment.source_filename).suffix attachment.source_suffix = Path(attachment.source_filename).suffix
saved_path = save_dir / f'{hash.hexdigest()}{attachment.source_suffix}' attachment.hash = hash.hexdigest()
saved_path = save_dir / f'{attachment.hash}{attachment.source_suffix}'
# 임시로 받은 파일 옮기기 # 임시로 받은 파일 옮기기
if not saved_path.exists(): if not saved_path.exists():