FIX:文件名下划线
Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -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() | ... | ... |
-
Please register or sign in to post a comment