Skip to content

Commit fa21abb

Browse files
author
Alan Shaw
committed
docs: fix docs for add - moved to root namespace
License: MIT Signed-off-by: Alan Shaw <[email protected]>
1 parent 36ac798 commit fa21abb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

SPEC/FILES.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ In the browser, assuming `ipfs = new Ipfs(...)`:
8787

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

@@ -104,7 +104,7 @@ const files = [
104104
}
105105
]
106106

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

110110
The `results` array:
@@ -272,7 +272,7 @@ ipfs.addFromURL('http://example.com/', (err, result) => {
272272
273273
##### `ipfs.addFromStream(stream, [callback])`
274274

275-
This is very similar to `ipfs.files.add({ path:'', content: stream })`. It is like the reverse of cat.
275+
This is very similar to `ipfs.add({ path:'', content: stream })`. It is like the reverse of cat.
276276

277277
```JavaScript
278278
ipfs.addFromStream(<readable-stream>, (err, result) => {

0 commit comments

Comments
 (0)