Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 41ee9c6

Browse files
committed
fix: update API in the script example
addresses #1783
1 parent 7bcc496 commit 41ee9c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/browser-script-tag/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ <h2>Some suggestions</h2>
2828
<p>Try adding a new file:</p>
2929

3030
<code style="display:block; white-space:pre-wrap; background-color:#d7d6d6">
31-
node.add(new node.types.Buffer('Hello world!'), (err, filesAdded) => {
31+
node.files.add(new node.types.Buffer('Hello world!'), (err, filesAdded) => {
3232
if (err) {
3333
return console.error('Error - ipfs add', err, res)
3434
}
@@ -40,7 +40,7 @@ <h2>Some suggestions</h2>
4040
<p>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'</p>
4141

4242
<code style="display:block; white-space:pre-wrap; background-color:#d7d6d6">
43-
node.cat('QmQzCQn4puG4qu8PVysxZmscmQ5vT1ZXpqo7f58Uh9QfyY', function (err, data) {
43+
node.files.cat('QmQzCQn4puG4qu8PVysxZmscmQ5vT1ZXpqo7f58Uh9QfyY', function (err, data) {
4444
if (err) {
4545
return console.error('Error - ipfs files cat', err, res)
4646
}

0 commit comments

Comments
 (0)