若 要 使 下 载 的 文 件 以 附 件 的 形 式 出 现 在 浏 览 器 , 则 需 要 设 置 响 应 头 的 属 性 content-disposition 的值为 attachment,且需要指定浏览器下载后显示的文件名。即需要指定 content-disposition 的值为 attachment;filename=文件名。
更新时间:2017年04月08日
若 要 使 下 载 的 文 件 以 附 件 的 形 式 出 现 在 浏 览 器 , 则 需 要 设 置 响 应 头 的 属 性 content-disposition 的值为 attachment,且需要指定浏览器下载后显示的文件名。即需要指定 content-disposition 的值为 attachment;filename=文件名。