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