Fix filename when downloading batch file.

This commit is contained in:
Lance Edgar 2015-02-12 23:24:36 -06:00
parent eedbcb81f8
commit 26e5be9897

View file

@ -685,7 +685,7 @@ class FileBatchCrud(BatchCrud):
path = batch.filepath(config)
response = FileResponse(path, request=self.request)
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