-
-
Notifications
You must be signed in to change notification settings - Fork 147
[Bug]: 在node.js 使用上传不了文件 #822
Copy link
Copy link
Open
Labels
bug:need-confirmIt's probably a bugIt's probably a buglang:chineseThis issue uses ChineseThis issue uses Chinese
Metadata
Metadata
Assignees
Labels
bug:need-confirmIt's probably a bugIt's probably a buglang:chineseThis issue uses ChineseThis issue uses Chinese
Type
Fields
Give feedbackNo fields configured for issues without a type.
这是否是一个 Bug?
这个问题是否已经存在?
Alova 版本
3.5.1
前端框架
Nodejs
问题描述
import FormData from 'form-data'
import axios from 'axios'
import fs from 'fs'
import { createAlova } from 'alova'
import adapterFetch from 'alova/fetch'
const formData = new FormData();
formData.append('file', fs.createReadStream(filePath));
formData.append('fileName', path.basename(filePath))
const alovaInstance = createAlova({
requestAdapter: adapterFetch(),
responded: response => response.json()
});
//这个无法上传
await alovaInstance.Post(uploadUrl, newFormData)
//axios能上传
axios.post(uploadUrl, formData)
期望的表现
No response
复现链接
No response
复现步骤
执行后接口无法获取文件数据
系统信息
补充说明
No response