Django下载中文名文件:
the_file_name = "中文名.abc"
response = HttpResponse(stream)
response['Content-Type'] = 'application/octet-stream'
response['Content-Disposition'] = 'attachment;filename=''{}'.format(escape_uri_path(the_file_name))
return response
Django下载中文名文件:
the_file_name = "中文名.abc"
response = HttpResponse(stream)
response['Content-Type'] = 'application/octet-stream'
response['Content-Disposition'] = 'attachment;filename=''{}'.format(escape_uri_path(the_file_name))
return response