Fix bug when downloading batch file
This commit is contained in:
parent
8399eb8f91
commit
674a315104
|
@ -946,7 +946,7 @@ class FileBatchMasterView(BatchMasterView):
|
|||
batch = self.get_instance()
|
||||
if not batch:
|
||||
raise httpexceptions.HTTPNotFound()
|
||||
path = self.handler.data_path(batch)
|
||||
path = batch.filepath(self.rattail_config)
|
||||
response = FileResponse(path, request=self.request)
|
||||
response.headers[b'Content-Length'] = str(os.path.getsize(path))
|
||||
filename = os.path.basename(batch.filename).encode('ascii', 'replace')
|
||||
|
|
Loading…
Reference in a new issue