8b18dc07 by 冯轩

FIX:文件名下划线

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