
获取远程资源二进制文件流
使用FormData上传文件
axios({
method: 'get',
url: 'https://xxxx.com/uploads/5910c1d7ea87900.pdf',
responseType: 'blob' // 返回二进制
}).then(async response => {
const formData = new FormData();
formData.append('resume-file', response.data);
const res = await axios.post('https://xxxx.com/portrait-upload', formData); //文件上传
console.log(res)
}) - 本文固定链接: http://ttfde.top/index.php/post/436.html
- 转载请注明: admin 于 TTF的家园 发表
《本文》有 0 条评论