0
在前端使用react和react-router,node +表示为我的后端,cloudinary存储我的映像文件。将blob上传到Cloudinary
遇到的问题林是,cloudinary API方法斜面似乎打开/解析该图像存储在数据blob
{ images: { preview: 'blob:http://localhost:8080/19526dcc-b67d-4697-b112-e5480de61d03' } }
cloudinary.v2.uploader.upload(body.images.preview, function(result) {
console.log(result)
})
错误响应:
{ Error: ENOENT: no such file or directory, open 'blob:http://localhost:8080/e7f30c71-7e06-4c36-801f-49666e9df053'
at Error (native)
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: 'blob:http://localhost:8080/e7f30c71-7e06-4c36-801f-49666e9df053'
}
如果不知道是由于反应路由器的问题,还是应该将数据转换为其他格式?
路线是这样的:
app.use('/api/', posts);
app.use('/api/', users);
app.use(express.static(staticPath));
app.use('/', express.static(staticPath));
app.use('/posts/*', express.static(staticPath));
app.use('/new/*', express.static(staticPath));
app.use('/validateEmail/*', express.static(staticPath));