1
0
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:
lian 2019-07-19 20:37:05 +08:00 committed by Daniel Pan
parent c29f894c66
commit 2ab3b45bf6

View File

@ -248,7 +248,7 @@ class SystemUserTrafficExcelView(APIView):
return api_error(status.HTTP_500_INTERNAL_SERVER_ERROR, error_msg)
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)
return response
@ -293,7 +293,7 @@ class SystemUserStorageExcelView(APIView):
return api_error(status.HTTP_500_INTERNAL_SERVER_ERROR, error_msg)
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)
return response