function uploadFile(file) {
const fd = new FormData();
fd.append('file', file);
return fetch('//yun-api.sungdell.com/upload-file?siteName=d1104kre7804', {
mode: 'cors',
method: 'POST',
body: fd,
}).then(res => {
return res.json();
}).then(res => {
console.log('res is',res);
return res.url;
})
}
-->