mirror of
https://github.com/haiwen/seahub.git
synced 2025-07-08 12:44:03 +00:00
add double quotes to Content-Disposition header (#3875)
This commit is contained in:
parent
c29f894c66
commit
2ab3b45bf6
@ -248,7 +248,7 @@ class SystemUserTrafficExcelView(APIView):
|
|||||||
return api_error(status.HTTP_500_INTERNAL_SERVER_ERROR, error_msg)
|
return api_error(status.HTTP_500_INTERNAL_SERVER_ERROR, error_msg)
|
||||||
|
|
||||||
response = HttpResponse(content_type='application/ms-excel')
|
response = HttpResponse(content_type='application/ms-excel')
|
||||||
response['Content-Disposition'] = 'attachment; filename=%s.xlsx' % excel_name
|
response['Content-Disposition'] = 'attachment; filename="%s.xlsx"' % excel_name
|
||||||
wb.save(response)
|
wb.save(response)
|
||||||
|
|
||||||
return response
|
return response
|
||||||
@ -293,7 +293,7 @@ class SystemUserStorageExcelView(APIView):
|
|||||||
return api_error(status.HTTP_500_INTERNAL_SERVER_ERROR, error_msg)
|
return api_error(status.HTTP_500_INTERNAL_SERVER_ERROR, error_msg)
|
||||||
|
|
||||||
response = HttpResponse(content_type='application/ms-excel')
|
response = HttpResponse(content_type='application/ms-excel')
|
||||||
response['Content-Disposition'] = 'attachment; filename=%s.xlsx' % excel_name
|
response['Content-Disposition'] = 'attachment; filename="%s.xlsx"' % excel_name
|
||||||
wb.save(response)
|
wb.save(response)
|
||||||
|
|
||||||
return response
|
return response
|
||||||
|
Loading…
Reference in New Issue
Block a user