More robust attachments serve
parent
e0a5e6cca5
commit
c956eeaee3
|
@ -111,7 +111,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(attachment.url)
|
response['Content-Type'] = mimetypes.guess_type(name)
|
||||||
|
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue