用户:
萌新大佬查看:35 回复:4 评论:35 创建时间:2022-08-22T14:00:37
好多人把html或图片上传到static上了,这是怎么做到的啊
var xhr = new XMLHttpRequest();
xhr.open('post', '前面的链接,防吃格式', true);
xhr.send(file); // file是文件内容
xhr.onreadystatechange = () => {
if (xhr.readyState == 4) {
const { Key, Size } = JSON.parse(xhr.response);
};
};点赞0
评论