-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
const xhr = new XMLHttpRequest();
xhr.open("POST", url, true);
xhr.onreadystatechange = () => {
if (xhr.readyState === 4) {
if (xhr.status === 200) {
console.log("成功");
} else {
console.log("上传失败", xhr);
}
}
};
xhr.setRequestHeader("Content-type", file.type);
xhr.send(file);
https://www.jianshu.com/p/918c63045bc3
https://www.cnblogs.com/52fhy/p/5436673.html
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels