Download working well with content-dispoition and filename.

This commit is contained in:
Marc Durepos 2023-09-21 20:00:42 -04:00
parent e4f5ae123a
commit e1576aba18

View file

@ -60,5 +60,6 @@ class DocumentCustomerPortal(CustomerPortal):
headers = [
('content-type', attachment.mimetype),
('content-length', attachment.file_size),
('content-disposition', f'attachment; filename="{document.name}"')
]
return request.make_response(attachment.raw, headers)