diff --git a/examples/browser-exchange-files/public/app.js b/examples/browser-exchange-files/public/app.js index 5b20d82f84..3a19e3a4f6 100644 --- a/examples/browser-exchange-files/public/app.js +++ b/examples/browser-exchange-files/public/app.js @@ -239,9 +239,9 @@ async function getFile () { FILES.push(hash) - for await (const file of node.get(hash)) { - if (file.content) { - const content = uint8ArrayConcat(await all(file.content)) + for await (const file of node.ls(hash)) { + if (file.type === 'file') { + const content = uint8ArrayConcat(await all(node.cat(file.cid))) await appendFile(file.name, hash, file.size, content) onSuccess(`The ${file.name} file was added.`)