af1f592a by 冯轩

FIX:文件名下划线

1 parent e0d20435
......@@ -2024,7 +2024,7 @@ class InvoiceExcelView(GenericView):
download_file_name = "发票信息提取-" + current_time + ".xlsx"
f = open(file_path,"rb")
response = HttpResponse(content_type='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet')
response['Content-Disposition'] = 'attachment; filename="{0}"'.format(escape_uri_path(download_file_name))
response['Content-Disposition'] = 'attachment; filename={0}'.format(escape_uri_path(download_file_name))
response['Access-Control-Expose-Headers'] = 'content-disposition'
response.write(f.read())
f.close()
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!