Skip to content

Commit b9f4c51

Browse files
committed
progress
1 parent 59eff05 commit b9f4c51

File tree

7 files changed

+41
-6
lines changed

7 files changed

+41
-6
lines changed
-802 KB
Loading
-631 KB
Loading
418 KB
Loading
-47.6 KB
Loading
-163 KB
Loading
-649 KB
Loading

docs/quickstart/publish.md

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: 'learn about pinning services and the lifecycle of content-addresse
55

66
# Publish a file to IPFS
77

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.
99

1010
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.
1111

@@ -18,15 +18,14 @@ In this guide, you will use the web3.storage UI to upload the file. If you prefe
1818
## Prerequisites
1919

2020
- A free [web3.storage](https://web3.storage/) account.
21-
- The following image, downloaded and saved on your computer: ![following image](/images/welcome-to-IPFS.jpg)
21+
- The [following image](/images/welcome-to-IPFS.jpg), downloaded and saved on your computer:
2222

2323
## 1. Sign in to web3.storage
2424

2525
Start by signing into your account on web3.storage:
2626

2727
![web3.storage login window](./images/login-web3-storage.png)
2828

29-
3029
## 2. Open the Upload files tab
3130

3231
After logging in, click on **Upload files** button to open the upload tab:
@@ -37,11 +36,47 @@ It should look as follows:
3736

3837
![web3.storage upload tab](./images/web3-upload-tab.png)
3938

40-
## 3. Upload the file
39+
## 3. Upload and Pin the file
4140

4241
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.
4342

44-
4543
Once the file has been successfully uploaded you should see the following:
4644

47-
![web3.storage file uploaded](images/web3-file-uploaded.png)
45+
![web3.storage file uploaded](./images/web3-file-uploaded.png)
46+
47+
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+
![file after upload](./images/web3-file-after-upload.png)
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.
79+
80+
## Conclusion
81+
82+
## Next steps

0 commit comments

Comments
 (0)