Fix filename when downloading batch file.
This commit is contained in:
parent
eedbcb81f8
commit
26e5be9897
|
@ -685,7 +685,7 @@ class FileBatchCrud(BatchCrud):
|
||||||
path = batch.filepath(config)
|
path = batch.filepath(config)
|
||||||
response = FileResponse(path, request=self.request)
|
response = FileResponse(path, request=self.request)
|
||||||
response.headers[b'Content-Length'] = str(batch.filesize(config))
|
response.headers[b'Content-Length'] = str(batch.filesize(config))
|
||||||
response.headers[b'Content-Disposition'] = b'attachment; filename={0}'.format(batch.filename)
|
response.headers[b'Content-Disposition'] = b'attachment; filename="{0}"'.format(batch.filename)
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue