af1f592a by 冯轩

FIX:文件名下划线

1 parent e0d20435
...@@ -2024,7 +2024,7 @@ class InvoiceExcelView(GenericView): ...@@ -2024,7 +2024,7 @@ class InvoiceExcelView(GenericView):
2024 download_file_name = "发票信息提取-" + current_time + ".xlsx" 2024 download_file_name = "发票信息提取-" + current_time + ".xlsx"
2025 f = open(file_path,"rb") 2025 f = open(file_path,"rb")
2026 response = HttpResponse(content_type='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet') 2026 response = HttpResponse(content_type='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet')
2027 response['Content-Disposition'] = 'attachment; filename="{0}"'.format(escape_uri_path(download_file_name)) 2027 response['Content-Disposition'] = 'attachment; filename={0}'.format(escape_uri_path(download_file_name))
2028 response['Access-Control-Expose-Headers'] = 'content-disposition' 2028 response['Access-Control-Expose-Headers'] = 'content-disposition'
2029 response.write(f.read()) 2029 response.write(f.read())
2030 f.close() 2030 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!