From c956eeaee3e8e0b9da6f674dc08ac9c1c7bba0f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Wed, 20 Aug 2014 09:28:13 +0200 Subject: [PATCH] More robust attachments serve --- taiga/projects/attachments/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/taiga/projects/attachments/api.py b/taiga/projects/attachments/api.py index d7d3eb3a..d306f27a 100644 --- a/taiga/projects/attachments/api.py +++ b/taiga/projects/attachments/api.py @@ -111,7 +111,7 @@ class RawAttachmentView(generics.RetrieveAPIView): response['X-Accel-Redirect'] = "/{filepath}".format(filepath=name) response['Content-Disposition'] = 'attachment;filename={filename}'.format( filename=os.path.basename(name)) - response['Content-Type'] = mimetypes.guess_type(attachment.url) + response['Content-Type'] = mimetypes.guess_type(name) return response