87,910
社区成员
发帖
与我相关
我的任务
分享
const upload = async (url, formData) => {
fetch(url, {
method: 'POST',
headers: {
'content-Type': 'multipart/form-data',
},
body: formData,
})
.then(response => (response.json()))
.catch(error => {
console.log(error);
});
};