浏览器从服务器端下载文件的方法:
其实本质是发送request(get,post皆可),服务端返回文嘉格式的response,这样浏览器就会弹出保存框了。这样文件的生成,即使在服务器端处理生成的了。
response header:
Content-Disposition:attachment;filename="12345.xls"
Content-Type:application/vnd.ms-excel
浏览器从服务器端下载文件的方法:
其实本质是发送request(get,post皆可),服务端返回文嘉格式的response,这样浏览器就会弹出保存框了。这样文件的生成,即使在服务器端处理生成的了。
response header:
Content-Disposition:attachment;filename="12345.xls"
Content-Type:application/vnd.ms-excel