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/quickstart/publish.md
+41-6Lines changed: 41 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ description: 'learn about pinning services and the lifecycle of content-addresse
5
5
6
6
# Publish a file to IPFS
7
7
8
-
In this quickstart guide, you will learn about pinning services and the lifecycle of content-addressed data in IPFS by pinning a file to the IPFS network. By the end of this guide, you should have a better understanding of how content addressing and CIDs work from a high level.
8
+
In this quickstart guide, you will learn about **pinning services** and the lifecycle of content-addressed data in IPFS by pinning a file to the IPFS network. By the end of this guide, you should have a better understanding of how content addressing and CIDs work from a high level.
9
9
10
10
Pinning a file to IPFS is how content is published to IPFS. Any given file can be pinned to multiple IPFS nodes to increase the redundancy and resilience of a file on the network.
11
11
@@ -18,15 +18,14 @@ In this guide, you will use the web3.storage UI to upload the file. If you prefe
18
18
## Prerequisites
19
19
20
20
- A free [web3.storage](https://web3.storage/) account.
21
-
- The following image, downloaded and saved on your computer: 
21
+
- The [following image](/images/welcome-to-IPFS.jpg), downloaded and saved on your computer:
22
22
23
23
## 1. Sign in to web3.storage
24
24
25
25
Start by signing into your account on web3.storage:
Either drag the [image file](/images/welcome-to-IPFS.jpg) to the dashed rectangle or click on the dashed rectangle to select the [image](/images/welcome-to-IPFS.jpg) file.
43
42
44
-
45
43
Once the file has been successfully uploaded you should see the following:
If you close the upload tab you should also be able to see a shortened Content Identifier ([CID](../concepts/content-addressing.md)) of the uploaded image, `bafyb...d32wm3q4`:
48
+
49
+

50
+
51
+
Congratulations, you have successfully **pinned** a file to IPFS!
52
+
53
+
The full CID for the file is: `bafybeicn7i3soqdgr7dwnrwytgq4zxy7a5jpkizrvhm5mv6bgjd32wm3q4`
54
+
55
+
### What's a CID
56
+
57
+
Let's unpack what just happened. In IPFS, every file and directory is identified with a CID. The generated CID serves as the permanent address of the file and can be used by anyone to find it on the IPFS network.
58
+
59
+
### What happens when you pin a file
60
+
61
+
When you uploaded and pinned the file to web3.storage you performed two actions:
62
+
63
+
1.**Representing:** The file was transformed into a content-addressable representation known as a [Merkle DAG](../concepts/merkle-dag.md). Don't worry about what that means, besides that it makes the files and directories **content-addressable** with CIDs by chunking files into smaller chunks and calculating their hashes.
64
+
2.**providing:** The content-addressable representation of the file was persisted on one of web3.storage's IPFS nodes (servers running an IPFS node) and made publicly available to the IPFS network.
65
+
66
+
## Fetching the CID from multiple gateways
67
+
68
+
## The lifecycle of data in IPFS
69
+
70
+
- Representing
71
+
- Providing/Advertising
72
+
- Fetching
73
+
- Pinning
74
+
- Deleting
75
+
76
+
> Note: Note that the transformation into a content-addressable representation can be a local operation that doesn't require any network connectivity. With web3.storage this happens on the client-side in the browser but it's also common .
77
+
78
+
This means that you can now share the CID and anyone should be able to fetch it.
0 commit comments