我正在尝试使用 Multer 上传文件,然后将它们发送到 Cloudinary 来存储。
发送到本地目录时成功,但发送到Cloudinary时成功 我没有收到来自该程序或 cloudinary 的任何反馈。
app.get('/', function(req, res){
res.render('index.html');
});
app.post('/upload', multer(multerConfig).single('photo'),function(req, res){
cloudinary.uploader.upload(req.file.path,{tags:'basic_sample'},function(result){
console.log(result)
});
};
);
最佳答案
我没有使用 mutler,而是使用了 connect-multiparty,它再完美不过了。
https://github.com/highskillzz/Gotemps/
这是我使用它的项目。但我用它来上传文件,所以只关心这方面
关于node.js - 使用 Multer 上传到 Cloudinary,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51288319/