From 3f6545c5fd7c92c9a995e672ae1fcd47004ed937 Mon Sep 17 00:00:00 2001 From: Daniel N <2color@users.noreply.github.com> Date: Mon, 16 Dec 2024 13:02:21 +0100 Subject: [PATCH] fix: web apps guide --- docs/.vuepress/config.js | 2 +- docs/how-to/ipfs-in-web-apps.md | 24 +++++++++--------------- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index ebd54ba3c..81b596c8e 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -259,7 +259,7 @@ module.exports = { sidebarDepth: 1, collapsable: true, children: [ - '/how-to/ipfs-on-the-web', + '/how-to/ipfs-in-web-apps', '/how-to/address-ipfs-on-web', ] }, diff --git a/docs/how-to/ipfs-in-web-apps.md b/docs/how-to/ipfs-in-web-apps.md index 5296700c2..107cc94db 100644 --- a/docs/how-to/ipfs-in-web-apps.md +++ b/docs/how-to/ipfs-in-web-apps.md @@ -1,6 +1,6 @@ --- title: IPFS in web applications -description: How to use IPFS in web applications, including IPFS retrieval and pinning in browsers using implementations such as Helia. +description: How to develop applications that use IPFS in web browsers, including IPFS retrieval and pinning in browsers using implementations such as Helia. --- # IPFS in web-applications and resource-constrained environments @@ -25,7 +25,6 @@ As a developer, IPFS exposes three main operations for interacting with the netw - **Providing data by CID**: making data addressed by a CID retrievable by other peers, either by running a node or with a pinning service. - **Retrieving data by CID**: given a CID, IPFS finds providers (peers who share the block), connects to them, fetches the blocks, and verifies. - ## Addressing by CID @@ -60,15 +59,14 @@ console.info(cid) ### Example: Addressing a file by CID with unixfs -

- See the Pen + ## Providing data -In the examples above you saw how to address data by CID. But what you do with it depends on your use case. +In the examples above you saw how to address data by CID. But what you do with it depends on your use case. If you want to data to be retrievable by other peers on [Mainnet](../concepts/glossary.md#ipfs-mainnet) you will want to upload it to a pinning service or an IPFS node you run. @@ -80,20 +78,16 @@ For this reason, you should almost never count on providing data from a browser Instead, you should provide data from a long-running server that runs reliably and has a public IP. That can be a Kubo node that you run, or a [pinning service](../concepts/persistence.md#pinning-services). - ### CAR files -### Example: Uploading a file to a pinning service +CAR files offer a serialized representation of content-addressed resources in one single concatenated stream, alongside a header that describes that content. This makes them a great way to store content-addressed data in a way that is easy to transport and store. -TODO: ## Retrieval ### With Verified-fetch -

- See the Pen +