Fix bug #726: Solve problem with with attachments content-type header

remotes/origin/enhancement/email-actions
Jesús Espino 2014-09-03 13:30:14 +02:00
parent 2e141eae0a
commit cedbbbcda5
1 changed files with 1 additions and 1 deletions

View File

@ -117,7 +117,7 @@ class RawAttachmentView(generics.RetrieveAPIView):
response['X-Accel-Redirect'] = "/{filepath}".format(filepath=name) response['X-Accel-Redirect'] = "/{filepath}".format(filepath=name)
response['Content-Disposition'] = 'attachment;filename={filename}'.format( response['Content-Disposition'] = 'attachment;filename={filename}'.format(
filename=os.path.basename(name)) filename=os.path.basename(name))
response['Content-Type'] = mimetypes.guess_type(name) response['Content-Type'] = mimetypes.guess_type(name)[0]
return response return response