axios接受文件流转文件
2018-09-19 本文已影响0人
Eaton_513f
设置{responseType:'arraybuffer'}
axios.post(apiUrl, formdata, {responseType:'arraybuffer'}).then().catch();
axios 文档对responseType 的说明
`responseType` 表示服务器响应的数据类型,可以是 'arraybuffer', 'blob', 'document', 'json', 'text', 'stream'
默认的 responseType: 'json',