所以这是我的代码,我试图将文件发布到 url,但我不知道我做错了什么..
const onFileUpload = () => {
// Create an object of formData
const formData = new FormData();
// Update the formData object
formData.append(
'file',
selectedimage,
);
// Details of the uploaded file
console.log(selectedimage);
// Send formData object
axios.post("http://localhost:3000/upload", formData)
.then(res => {
console.log(res.statusText)
})
我正在尝试获取表单数据标题
好吧,我相信我希望它显示在“标题”选项卡中的表单数据现在在“有效负载”选项卡中。也许这是某种更新。这可能对像我这样的新手有帮助。