Fixed bug #726: Now attachments are in new window but inline
parent
d913ffb7a0
commit
97fb48328e
|
@ -107,7 +107,7 @@ class RawAttachmentView(generics.RetrieveAPIView):
|
||||||
name = attachment.name
|
name = attachment.name
|
||||||
response = http.HttpResponse()
|
response = http.HttpResponse()
|
||||||
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'] = 'inline;filename={filename}'.format(
|
||||||
filename=os.path.basename(name))
|
filename=os.path.basename(name))
|
||||||
|
|
||||||
return response
|
return response
|
||||||
|
|
Loading…
Reference in New Issue