def RotateText(request):
cwd=os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
response=FileResponse(open(cwd+"/upload/htmlcss/RotateText.rar","rb")) #文件路径信息
response['Content-Type']='application/octet-stream' #文件格式设置
response['Content-Disposition']='attachment;filename="RotateText.rar"' #下载后文件的名称
return response
Content-Type:一般是指网页中存在的Content-Type,用于定义网络文件的类型和网页的编码,决定浏览器将以什么形式、什么编码读取这个文件
常见Application Type :
Text Type:
Audio Type:
Image Type:



