diff --git a/src/object/get.js b/src/object/get.js index 82b21bb58..28b208003 100644 --- a/src/object/get.js +++ b/src/object/get.js @@ -41,12 +41,17 @@ module.exports = (send) => { send({ path: 'object/get', - args: cidB58Str + args: cidB58Str, + qs: { + 'data-encoding': 'base64' + } }, (err, result) => { if (err) { return callback(err) } + result.Data = Buffer.from(result.Data, 'base64') + const links = result.Links.map((l) => { return new DAGLink(l.Name, l.Size, Buffer.from(bs58.decode(l.Hash))) })