fix: forgot to store file hash
This commit is contained in:
@@ -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():
|
||||||
|
Reference in New Issue
Block a user