download & excel & blob
download & excel & blob
Blob
https://developer.mozilla.org/en-US/docs/Web/API/Blob
FileReader
https://developer.mozilla.org/en-US/docs/Web/API/FileReader
download & excel
backend auto download
A response triggering the "Save As" dialog:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition#Examples
Content-Type: text/html; charset=utf-8
Content-Disposition: attachment; filename="cool.html"
Content-Length: 22
excel & content-type
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
Excel & Content-Type
const File = {
name: "test.xlsx",
lastModified: 1551442905961,
lastModifiedDate: Fri Mar 01 2019 20:21:45 GMT+0800 (China Standard Time),
webkitRelativePath: "",
size: 8957,
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
};
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/10458779.html
未经授权禁止转载,违者必究!