Fix msg body display, download link for email bounces

This commit is contained in:
Lance Edgar 2023-09-08 10:56:25 -05:00
parent 6e50288bd4
commit 7221400b88
3 changed files with 18 additions and 35 deletions

View file

@ -1593,9 +1593,9 @@ class MasterView(View):
"""
obj = self.get_instance()
filename = self.request.GET.get('filename', None)
if not filename:
raise self.notfound()
path = self.download_path(obj, filename)
if not path or not os.path.exists(path):
raise self.notfound()
response = FileResponse(path, request=self.request)
response.content_length = os.path.getsize(path)
content_type = self.download_content_type(path, filename)