我目前正在构建一个反应性组件,用户可以在其中上传图像。在这个简化的例子中,我想上传3张图片。当每个文件的上传完成后,我想将这个文件添加到我上传的文件列表中。}) }
//blackbox for uploading an image async with axioslike:
//return axios.post(url, image
现在,当我在服务器端创建POST函数并尝试在前端使用Axios执行它时,我得到以下值: Cannot GET /api/register/ 在我重新安装Windows之前,我没有在我的项目中使用任何表单标签});
app.listen(3001, () => {console.log('Server is listening on port 3001')}) 前端(仅导入部分代码): Axios.post
我正在尝试使用fetch调用上传一个图像,并且我一直收到以下错误:at node_modules\whatwg-fetch\dist\fetch.umd.js\react-native\Libraries\BatchedBridge\MessageQueue.js:113:6 in __guard$argument_0
at node_modules\react-native我尝试过使用axios上传文件,但这也不起作用,因为一些格式数据-axios