#使用获取storage信息函数
fdfs.listStorages('group1').then(function(storages) {
console.log(storages);
}).catch(function(err) {
console.error(err);
});
#报错
(node:6560) Warning: a promise was rejected with a non-error: [object String]
byte array length:612 is invalid!
#暂时解决办法
将_fdfs@1.0.4@fdfs/lib/tracker.js 280行 修改为
if (body.length % 612 != 0) {
reject('byte array length:' + body.length + ' is invalid!');
return;
}
var res = {
count: body.length / 612,
storages: []
};
原文内容来自我的私人博客会不断更新