如果此头Content-Disposition: attachment用于应用程序/八位字节流content-type的响应中,则暗示的建议是用户代理不应显示响应,而是直接输入“将响应保存为...”对话框。
我把它理解为
Content-Type: application/octet-stream
Content-Disposition: attachment
但是我会认为Content-Type
应该是application/pdf
,image/png
等等。
如果我想让浏览器下载文件,我应该有Content-Type: application/octet-stream
吗?
https://stackoverflow.com/questions/20508788
复制相似问题