From 41ee9c697cf03315acff4a2431d38e90751e54f4 Mon Sep 17 00:00:00 2001 From: Zack Date: Fri, 21 Dec 2018 08:15:45 -0800 Subject: [PATCH] fix: update API in the script example addresses #1783 --- examples/browser-script-tag/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/browser-script-tag/index.html b/examples/browser-script-tag/index.html index 521be91c24..82025c803e 100644 --- a/examples/browser-script-tag/index.html +++ b/examples/browser-script-tag/index.html @@ -28,7 +28,7 @@

Some suggestions

Try adding a new file:

- node.add(new node.types.Buffer('Hello world!'), (err, filesAdded) => { + node.files.add(new node.types.Buffer('Hello world!'), (err, filesAdded) => { if (err) { return console.error('Error - ipfs add', err, res) } @@ -40,7 +40,7 @@

Some suggestions

You can cat that same file. If you used the exact same string as above ('Hello world!') you should have an hash like this: 'QmQzCQn4puG4qu8PVysxZmscmQ5vT1ZXpqo7f58Uh9QfyY'

- node.cat('QmQzCQn4puG4qu8PVysxZmscmQ5vT1ZXpqo7f58Uh9QfyY', function (err, data) { + node.files.cat('QmQzCQn4puG4qu8PVysxZmscmQ5vT1ZXpqo7f58Uh9QfyY', function (err, data) { if (err) { return console.error('Error - ipfs files cat', err, res) }