Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit 36ac798

Browse files
author
Alan Shaw
committed
docs: fix exported Buffer ref
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
1 parent b9575ac commit 36ac798

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

SPEC/FILES.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ If no `callback` is passed, a promise is returned.
8686
In the browser, assuming `ipfs = new Ipfs(...)`:
8787

8888
```js
89-
let content = ipfs.types.Buffer.from('ABC');
90-
let results = await ipfs.files.add(content);
91-
let hash = results[0].hash; // "Qm...WW"
89+
const content = Ipfs.Buffer.from('ABC')
90+
const results = await ipfs.files.add(content)
91+
const hash = results[0].hash // "Qm...WW"
9292
```
9393

9494
Now [ipfs.io/ipfs/Qm...WW](https://ipfs.io/ipfs/QmNz1UBzpdd4HfZ3qir3aPiRdX5a93XwTuDNyXRc6PKhWW)
@@ -100,11 +100,11 @@ The following allows you to add multiple files at once. Note that intermediate d
100100
const files = [
101101
{
102102
path: '/tmp/myfile.txt',
103-
content: ipfs.types.Buffer.from('ABC')
103+
content: Ipfs.Buffer.from('ABC')
104104
}
105105
]
106106

107-
const results = await ipfs.files.add(files);
107+
const results = await ipfs.files.add(files)
108108
```
109109

110110
The `results` array:

0 commit comments

Comments
 (0)