嗨,伙计们,我有一个有react和mongodb的项目。用户必须注册和登录才能访问应用程序。在用户登录后,他们有一个表单要输入(名称、数字和图像)。关于这些图片我有个问题。以前我使用form with action:http://localhost:3001/regstration,我想用append.file更改方法,但它不起作用。('http://localhost:3001/login'
所以这是我第一次尝试上传文件到服务器,我开始按照一个教程在react中构建后端和前端,但我不能让它工作。res.json(req.body.file) //body should give the name and description fieldapp.postapp.delete('/upload')
app.listen(port, () => {
conso
在客户端,我使用axios向服务器发送登录请求。在客户端,我使用axios发送请求,获取JWT,并将其存储在localstore中。axios.get('http://localhost:3001/google') console.log("result", result);Username or password not match' });