You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/basics/js/js-ipfs.md
+17-37Lines changed: 17 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,38 +54,6 @@ To build from source, clone the [source packages](https://github.com/ipfs/js-ipf
54
54
55
55
:::
56
56
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
-
89
57
::::
90
58
91
59
## Spawn a node
@@ -264,7 +232,7 @@ file are likely to change. Please reference the
264
232
265
233
::: tab ipfs-cli
266
234
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.
268
236
269
237
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.
270
238
@@ -282,6 +250,12 @@ The file has been added to the IPFS network and has given the file a CID.
282
250
You can share this CID with anyone, and they can use it on their IPFS node to
283
251
obtain the content you uploaded.
284
252
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:
@@ -413,7 +387,13 @@ By default, objects that you retrieve over IPFS are not pinned to your node. If
413
387
414
388
## Remove a file
415
389
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.
417
397
418
398
:::: tabs
419
399
@@ -468,9 +448,9 @@ This will output something like:
468
448
469
449
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.
470
450
471
-
:::
451
+
::: tip
472
452
473
-
::: tab ipfs-core
453
+
Run `jsipfs pin ls` again to confirm that the CID you intended to remove is no longer pinned.
0 commit comments