Skip to content

Commit fbb8e45

Browse files
committed
tweaks to content
1 parent c7e958e commit fbb8e45

File tree

2 files changed

+17
-37
lines changed

2 files changed

+17
-37
lines changed

docs/basics/js/js-ipfs.md

Lines changed: 17 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -54,38 +54,6 @@ To build from source, clone the [source packages](https://github.com/ipfs/js-ipf
5454

5555
:::
5656

57-
::: tab ipfs-http-client
58-
59-
### HTTP client module
60-
61-
To use the client on your machine, install the `ipfs-http-client` Node.js package:
62-
63-
```bash
64-
npm i ipfs-http-client
65-
```
66-
67-
### Build from source
68-
69-
To build from source, clone the [source package](https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client) and follow the build instructions.
70-
71-
:::
72-
73-
::: tab ipfs-client
74-
75-
### HTTP client module
76-
77-
To use the client on your machine, install the `ipfs-client` Node.js package:
78-
79-
```bash
80-
npm i ipfs-client
81-
```
82-
83-
### Build from source
84-
85-
To build from source, clone the [source package](https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client) and follow the build instructions.
86-
87-
:::
88-
8957
::::
9058

9159
## Spawn a node
@@ -264,7 +232,7 @@ file are likely to change. Please reference the
264232

265233
::: tab ipfs-cli
266234

267-
Navigate to the directory you wish to add a file from. You can also specify the file path when using the cli to add a file.
235+
In a new session, navigate to the directory you wish to add a file from. You can also specify the file path when using the cli to add a file.
268236

269237
The daemon uses an `ADD` method to request data from IPFS; `jsipfs add`. We will use a test file called `test.txt` to add through the jsipfs daemon.
270238

@@ -282,6 +250,12 @@ The file has been added to the IPFS network and has given the file a CID.
282250
You can share this CID with anyone, and they can use it on their IPFS node to
283251
obtain the content you uploaded.
284252

253+
To view the file contents, navigate to the [webui](http://127.0.0.1:5002/webui) and provide the CID on the search bar. The UI will provide the file contents, similar to the following:
254+
255+
<img src="../../images/jsipfs-add-webui.png" width="1000">
256+
257+
:::
258+
285259
::: tab ipfs-core
286260

287261
To add a file using `ipfs-core`, you can create a test `.txt` file in
@@ -318,7 +292,7 @@ The file has been added to the IPFS network and has given the file a CID.
318292
You can share this CID with anyone, and they can use it on their IPFS node to obtain
319293
the content you uploaded.
320294

321-
If you take the CID and load it on the gateway, you will see the content:
295+
If you take the CID and load it on the HTTP gateway, you will see the content:
322296
> e.g. https://ipfs.io/ipfs/QmYt9ypyGsR1BKdaCGPdwdBgAiuXK5AYN2bGSNZov7YXuk
323297
324298
<img src="../../images/jsipfs-add-gateway.png" width="1000">
@@ -413,7 +387,13 @@ By default, objects that you retrieve over IPFS are not pinned to your node. If
413387

414388
## Remove a file
415389

416-
Simply removing the content pin will remove a file from IPFS. In this section, we will remove the pinned `test.txt` file we pinned earlier.
390+
::: warning Removing a file from IPFS does not guarantee that is was completely removed from network.
391+
392+
There is no way to know if someone else has made a copy of the content from when it became available on the network. This is a caveat is also found in regular HTTP networks, as nothing stops users from addressing content and creating a copy once it is pushed to IPFS.
393+
394+
:::
395+
396+
Removing the content pin will remove a file from IPFS. In this section, we will remove the pinned `test.txt` file we pinned earlier.
417397

418398
:::: tabs
419399

@@ -468,9 +448,9 @@ This will output something like:
468448

469449
The target file has now been fully removed from your IPFS node and any other files that we did not pin. If the content that was just garbage collected was saved to your computer's local storage, it is still there. If you wish to remove the content from your computer's local storage, you will need to find where it is saved and delete it using the normal deletion method.
470450

471-
:::
451+
::: tip
472452

473-
::: tab ipfs-core
453+
Run `jsipfs pin ls` again to confirm that the CID you intended to remove is no longer pinned.
474454

475455
:::
476456

docs/images/jsipfs-add-webui.png

133 KB
Loading

0 commit comments

Comments
 (0)