mirror of
https://github.com/Kozea/WeasyPrint.git
synced 2024-09-17 15:37:34 +03:00
Merge pull request #2063 from kesara/fix/attachment-hash
Get correct checksum for attachments
This commit is contained in:
commit
f85a09eb10
@ -300,7 +300,7 @@ def write_pdf_attachment(pdf, attachment, compress):
|
||||
except URLFetchingError as exception:
|
||||
LOGGER.error('Failed to load attachment: %s', exception)
|
||||
return
|
||||
attachment.md5 = hashlib.md5(data).hexdigest()
|
||||
attachment.md5 = hashlib.md5(stream).hexdigest()
|
||||
|
||||
# TODO: Use the result object from a URL fetch operation to provide more
|
||||
# details on the possible filename and MIME type.
|
||||
|
Loading…
Reference in New Issue
Block a user