Collaborative Documents

Scenario


Looking at a webpage of interest

Like in this case


Search for


Just select all and copy into a document in peer suite space


and paste the content of the page 


Result in a faithful copy of the document object

You could


  • share it across devices with other users
  • real-time comment
  • collaborate
  • extend it on desktop to save document to your IPFS Desktop

This gives all the minimal workable plumbing to get the IndyWeb Up and running in
The Virtual Permanent Evergreen Cloud of Open Structures morphic interactions and interpersonal co-laboration

Personal first Interpersonal Web Based Work Inter Play

Playful Work Lila Labora Est Ora 

then we can make Indy0Pad Indy0Plex and Peersuie.space.Documents interplay

Take anything you 1 and all co-create real time
into Permanent documents via Indy0Pad and expand into Indy9WikiPlex Dots

and persist it in IPFS and Peergos Combo

----------------------------------------------------

To upload a string to IPFS using Helia and access it via IPFS Desktop, you can use the helia library in a Node.js environment. First, create a Helia node configured to connect to an IPFS provider like Infura or a local node, then use the unixfs module to add the string as a file. The following example demonstrates how to do this:

import { createHelia } from 'helia';
import { unixfs } from '@helia/unixfs';

const projectId = 'your-project-id';
const projectSecret = 'your-project-secret';
const auth = 'Basic ' + Buffer.from(`${projectId}:${projectSecret}`).toString('base64');

const helia = await createHelia({
  host: 'ipfs.infura.io',
  port: 5001,
  protocol: 'https',
  headers: {
    authorization: auth,
  },
});

const fs = unixfs(helia);

// Upload a string
const content = 'Hello, this is a test string.';
const fileToAdd = {
  path: 'test.txt',
  content: new TextEncoder().encode(content),
};

const cid = await fs.addFile(fileToAdd);
console.log('Uploaded CID:', cid.toString());

// Generate IPFS Desktop URL for preview
const desktopURL = `http://127.0.0.1:5001/webui/#/files/${cid}`;
console.log('Preview in IPFS Desktop:', desktopURL);

This code uploads the string as a file to the IPFS network through a remote provider, generates a Content Identifier (CID), and provides a link to view the file in IPFS Desktop. Note that uploading data to IPFS is not a direct upload to a centralized server but rather storing the data on your node or a pinning service, which then makes it available to the network. IPFS Desktop can access the file via the provided CID if the node is reachable and the file is pinned.

AI-generated answer. Please verify critical facts.
🌐
GitHub
github.com › ipfs › helia
GitHub - ipfs/helia: An implementation of IPFS in TypeScript
See the Manifesto, the FAQ, and ... types of data in and out of your Helia node. You can use the @helia/strings module to easily add and get strings from your Helia node:...
Starred by 1.2K users
Forked by 134 users
Languages   TypeScript 99.1% | JavaScript 0.9%
🌐
IPFS Forums
discuss.ipfs.tech › help › helia
How to retrieve content uploaded via Helia using the IPFS gateway? - Helia - IPFS Forums
15 April 2023 - Tried using Helia today: import { createHelia } from 'helia' import { strings } from '@helia/strings' const helia = await createHelia() const s = strings(helia) console.log(await s.add('quick test djkfjdkfjd')); It returned this hash: bafkreidoqdzmahiqe75jsfuu3cm3wdrmeipvjtz4b7l5xpuaidnlt65f3a And yet, the IPFS gateway returns an error when looking it up: https://ipfs.io/ipfs/bafkreidoqdzmahiqe75jsfuu3cm3wdrmeipvjtz4b7l5xpuaidnlt65f3a Why is that?
🌐
IPFS Forums
discuss.ipfs.tech › help › helia
How to add a file into IPFS network through helia - Helia - IPFS Forums
27 June 2024 - Hello, I am new to Helia and have been following helia-101. Regarding 301-networking, running the example 301-networking.js seems to upload the text “Hello World 301” to the IPFS network, allowing peers to share the information. This would enable me to retrieve the data “Hello World 301” from the gateway using https://ipfs.io/ipfs/{CID}. The documentation also mentions that I should be able to fetch the data from the gateway: npm run 301-networking Added file: bafkreife2klsil6kaxqhvmhgldps...
🌐
Helia
helia.io
Helia
We cannot provide a description for this page right now
🌐
Stack Overflow
stackoverflow.com › questions › 78617998 › data-not-uploading-on-ipfs-network-using-helia
npm - Data not uploading on IPFS network using Helia - Stack Overflow
As a test, I tried running https://github.com/haixuxu/ipfs-helia-rpc but it doesn't seem to work. Pre-uploaded cid works, but when I try to change the test string to encode, it's doesn't upload.
🌐
GitHub
github.com › ipfs-examples › helia-examples
GitHub - ipfs-examples/helia-examples: Ready-to-run Helia examples for Node.js and the browser
Give it the same name as the example folder, e.g. https://github.com/ipfs-examples/helia-transfer-files
Starred by 104 users
Forked by 70 users
🌐
Reddit
reddit.com › r/ipfs › ipfs helia
r/ipfs on Reddit: IPFS Helia
28 January 2024 - 

How can I integrate Helia to incorporate IPFS (InterPlanetary File System) as a cloud storage solution for a website?

Top answer
1 of 2
9
Let's begin by understanding the basics of IPFS IPFS is not cloud storage There is no uploading your files to IPFS. So what is it then ? ( Video ) When you "upload" file to IPFS you are storing the file on your system (or a third party system if you are using any services), you just compute the hash of the file. Let's say Qm...123, and you simply anounce to everyone who is using IPFS, saying "Hey, I have Qm...123" Now suppose I want a file whose hash is Qm...123, then ask the network "Anyone has Qm...123 ?", they you respond to me and we transfer the file (using Bitswap protocol). Think of it as BitTorrent , but even better. Now to your question, what do you mean by Cloud Storage solution ? There are two possible meaning of this You want to store users data on IPFS You want to store your files on IPFS (images, videos) and then provide it to users. For storing user generated content on IPFS: Since there is not cloud storage. A user can make this file available to the network. But if the user's device is offline then the content is not accessible by anyone. Here comes "Pinning", pinning refers to persistently keeping a file on a node. So the steps would be, the user make the file available on IPFS, then you (or a pinning service) pin the file. Once a file is pinned the user can go offline, while the pinning service will take care of the availablity of your file. You have to pin the file somewhere, either on your own server or on a pinning service like Pinata , Web3.storage or even better a decentralized pinning service like Crust.Network . 2. You want to store your files on IPFS (images, videos, etc) and then provide it to users. In such case, still you are required to pin the file somewhere (it is possible that you host your files on your own setup). Or make use of pinning services. Then you can leverage IPFS based CDN like Saturn Network , to get your content delieverd faster. Helia in browser is not very reliable, you can read about it more here . Hope this helps, if you have any further questions feel free to ask them. Please also take a look at official documentation and IPFS Community Forums for more details.
🌐
GitHub
github.com › ipfs-examples › helia-101
GitHub - ipfs-examples/helia-101: Getting started with Helia
Since your Helia node is configured with a libp2p node, you can go to an IPFS Gateway and load the printed hash.
Author   ipfs-examples
🌐
Stack Overflow
stackoverflow.com › questions › 76735161 › how-to-connect-to-local-nodes-and-modify-metadata-in-the-new-helia-library
How to connect to local nodes and modify metadata in the new Helia library?
Since the ipfs-http-client has been deprecated and replaced with Helia, I find myself unable to upload pictures to the ipfs-desktop, detect local nodes, and modify the picture's metadata as I used to. I couldn't find any documentation on how to connect to local nodes and modify metadata with Helia. Here's how I used to operate: async function run() { const { create } = await import('ipfs-http-client'); const ipfs = await create(); const metadata = { path: '/', content: JSON.stringify({ name: "My First NFT", attributes: [ { "trait_type": "Peace", "value": "10" }, { "trait_type": "Love", "value": "100" }, { "trait_type": "Web3", "value": "1000" } ], image: "https://ipfs.io/ipfs/QmQ2wnwaFJ1w42UTywTWpM8RgiqrWwKFR6AMrpyiHPgi3p", description: "So much PLW3!"
🌐
Reddit
reddit.com › r/ipfs › running helia based ipfs node
r/ipfs on Reddit: Running helia based ipfs node
31 October 2023 - 

We are a team of developers working on a data decentralization project. We developed a Helia-based IPFS node and are running it on our desktop. We uploaded files. I have some basic questions. 

My node won't change; I just upload files. How will it be accessible to another user, let's say I want to use the Brave browser to access a file? 

I know we have to use an IPFS gateway like Pinata to pin the file. Let's say I am running my node and I am connected to the internet. Will it still be accessible to another user over the internet? Do I need to open ports in my router?

Find elsewhere
🌐
IPFS Forums
discuss.ipfs.tech › help
What's the best way to handle uploads to IPFS from a web app? - Help - IPFS Forums
9 March 2024 - Helia does not actually commit to IPFS so it’s not an option. It (by default) stores in memory: The datastore can be configured with ones from js-stores, however none of them actually store on the IPFS network: GitHub - ipfs/js-stores: TypeScript ...
🌐
Reddit
reddit.com › r/ipfs › how to upload data with javascript code
r/ipfs on Reddit: How to upload data with javascript code
3 September 2023 - 

Hi, I'm sorry if this is a trivial issue, I am very new to IPFS and I'm using the new library called Helia with my Javascript app (specifically with react).

I have tried many ways of making a helia node like the ones mentioned here and the ones here. I have been trying for weeks to upload my data to the IPFS and be able to access it from a public gateway like ipfs.io/ipfs. I do get a CID returned to me using these methods but it doesn't show when I go to ipfs.io/ipfs/${cid}.

Please help me out and let me know where I must specify the public gateway to upload the data so I can see it when I use the gateway and CID. Thanks a lot 🙏

EDIT

Thanks for everyone who tried to help. I found this amazing tool and it seems to be working for me. You can check out this video for a short demo on using this. This library is called ThirdWeb and it does EXACTLY what I needed. Although it requires you to have a Web3 wallet and an API_key/client_ID (for your environment variables) which you can get from here.

Currently trying to figure out how it works and recreate some of the functionality myself. It's strange because this @thirdweb-dev/storage mentions neither IPFS-JS nor Helia in its dependencies so I have no idea how it is even accessing the IPFS network... yet.

For those who want to check out my code, here is the repo: https://github.com/Electromorphous/DeNotes

🌐
IPFS Forums
discuss.ipfs.tech › help › helia
Helia Example doesn't work - Helia - IPFS Forums
3 May 2023 - I am just following the Helia Example, Helia-101. I cloned the repo. Installed the dependencies by running npm install. And modified the data which generates CID at this line. And once I have new CID, I am unable to ret…
🌐
IPFS
ipfs.github.io › helia
Helia
See the Manifesto, the FAQ, and the State of IPFS in JS blog post from October 2022 for more info. A quick overview of how to get different types of data in and out of your Helia node. You can use the @helia/strings module to easily add and get strings from your Helia node:
🌐
Stack Overflow
stackoverflow.com › questions › 78864033 › how-to-integrate-helia-with-a-provider-such-as-infura-or-web3-storage
ipfs - How to integrate Helia with a provider (such as infura or web3-storage) - Stack Overflow
You upload data/files to your node or pinning services. But the whole point of IPFS is that every node is a like a server for data it has. This means that when you add data to Helia in node.js (and you have a public IP so you are reachable over the internet), and you provide a CID you become a provider for it.
🌐
Reddit
reddit.com › r/ipfs › helia
r/ipfs on Reddit: Helia
23 September 2023 - 

This is the code that came from helia which is from the helia webpack. originally, the code is programmed for uploading text (not txt file) and we are trying to change the code to accept any file format instead of just text. when uploading to helia, it only sets as a RAW file and we want it to change as a DAG-PB file in
IPFS.thank you so much for the help! 

import React, { useState, useRef } from 'react';
import { createHelia } from 'helia';
import { unixfs } from '@helia/unixfs'; 

function App() {
const [output, setOutput] = useState([]);
const [helia, setHelia] = useState(null);
const [fileContent, setFileContent] = useState('');
const [fileName, setFileName] = useState('');
const [uploadedFile, setUploadedFile] = useState(null);
const [uploadedCID, setUploadedCID] = useState('');
const [ipfsDesktopURL, setIpfsDesktopURL] = useState(''); 

const terminalEl = useRef(null); 

const COLORS = {
active: '#357edd',
success: '#0cb892',
error: '#ea5037'
}; 

const showStatus = (text, color, id) => {
setOutput(prev => [
...prev,
{
content: text,
color,
id
}
]); 

terminalEl.current.scroll({
top: window.terminal.scrollHeight,
behavior: 'smooth'
});
}; 

const store = async (name, content) => {
try {
let node = helia; 

if (!helia) {
showStatus('Creating Helia node...', COLORS.active);
node = await createHelia();
setHelia(node);

showStatus(Connecting to ${node.libp2p.peerId}..., COLORS.active, node.libp2p.peerId); 

const encoder = new TextEncoder(); 

// Include a random nonce in the file content
const nonce = Math.random().toString(36).substring(2);
const contentWithNonce = ${nonce}\n${content}; 

const fileToAdd = {
path: name,
content: encoder.encode(contentWithNonce)
}; 

const fs = unixfs(node); 

showStatus(Adding file ${fileToAdd.path}..., COLORS.active); 

const cid = await fs.addFile(fileToAdd); 

setUploadedCID(cid.toString());
showStatus(Added to ${cid}, COLORS.success, cid);
showStatus('Reading file...', COLORS.active); 

const desktopURL = http://127.0.0.1:5001/webui/#/files/${cid};
setIpfsDesktopURL(desktopURL.toLowerCase()); 

showStatus(Uploaded CID: ${cid}, COLORS.success);
showStatus(Preview in IPFS Desktop: ${desktopURL}, COLORS.success);
} catch (error) {
showStatus('Error adding file to Helia', COLORS.error);
console.error(error);
}
}; 

const handleSubmit = async e => {
e.preventDefault(); 

try {
if (!uploadedFile) {
throw new Error('No file uploaded...');

await store(uploadedFile.name, fileContent);
} catch (err) {
showStatus(err.message, COLORS.error);
}
}; 

const handleFileUpload = async e => {
const file = e.target.files[0];
setUploadedFile(file);
setFileName(file.name);
setFileContent('');
}; 

const handleUploadButtonClick = () => {
document.getElementById('file-upload').click();
}; 

return (
<>
<header className="flex items-center pa3 bg-navy">
<a href="[https://github.com/ipfs/helia](https://github.com/ipfs/helia)" title="home">
<img
alt="Helia logo"
src="https://unpkg.com/@helia/[email protected]/logos/outlined/helia-wordmark.svg"
style={{ height: 60 }}
className="v-top"
/>
</a>
</header> 

<main className="pa4-l bg-snow mw7 mv5 center pa4"> <h1 className="pa0 f2 ma0 mb4 navy tc">Add data to Helia</h1> 

<form id="add-file" onSubmit={handleSubmit}> {uploadedFile ? ( <> <label className="f5 ma0 pb2 navy fw4 db">Upload File:</label> <div>{fileName}</div> </> ) : ( <label htmlFor="file-upload" className="f5 ma0 pb2 navy fw4 db"> Upload File </label> )} <input className="input-reset bn black-80 bg-white pa3 w-100 mb3" id="file-upload" name="file-upload" type="file" onChange={handleFileUpload} required style={{ display: 'none' }} /> 

<label htmlFor="file-content" className="f5 ma0 pb2 navy fw4 db"> Content </label> <input className="input-reset bn black-80 bg-white pa3 w-100 mb3 ft" id="file-content" name="file-content" type="text" placeholder="Upload File" required value={fileContent} onChange={e => setFileContent(e.target.value)} readOnly /> {!uploadedFile && ( <button type="button" className="button-reset pv3 tc bn bg-animate bg-black-80 hover-bg-aqua white pointer w-100" onClick={handleUploadButtonClick} > Upload File </button> )} 

<button
className="button-reset pv3 tc bn bg-animate bg-black-80 hover-bg-aqua white pointer w-100"
id="add-submit"
type="submit"

Add file
</button> 

</form> 

{uploadedCID && ( 

<div> <h3>Uploaded CID:</h3> <p>{uploadedCID}</p> </div> )} 

{ipfsDesktopURL && ( 

<div> <h3>Preview in IPFS Desktop:</h3> <a href={ipfsDesktopURL} target="\_blank" rel="noopener noreferrer">{ipfsDesktopURL}</a> </div> )} 

<h3>Output</h3> 

<div className="window"> <div className="header"></div> <div id="terminal" className="terminal" ref={terminalEl}> {output.length > 0 && ( <div id="output"> {[output.map](http://output.map/)((log, index) => ( <p key={index} style={{ color: log.color }} id={[log.id](http://log.id/)}> {log.content} </p> ))} </div> )} </div> </div> </main> </> ); } 

export default App;
127.0.0.1

🌐
IPFS
docs.ipfs.tech › how-to › ipfs-in-web-apps
IPFS in web applications | IPFS Docs
Using the Helia (opens new window) library, which is the foundation for the @helia/verified-fetch library, and provides a more comprehensive and modular API for interacting with the IPFS network, beyond just retrieval.
🌐
IPFS
docs.ipfs.tech › reference › js › api
IPFS in JS | IPFS Docs
New to IPFS Helia? The Helia 101 example (opens new window) will walk you through spawning a Helia node, adding a file, and cat-ing the file CID both locally and through an IPFS gateway.
🌐
npm
npmjs.com › package › @helia › unixfs
helia/unixfs
import { createHelia } from 'helia' import { unixfs } from '@helia/unixfs' const helia = await createHelia() const fs = unixfs(helia) // create an empty dir and a file, then add the file to the dir const emptyDirCid = await fs.addDirectory() const fileCid = await fs.addBytes(Uint8Array.from([0, 1, 2, 3])) const updateDirCid = await fs.cp(fileCid, emptyDirCid, 'foo.txt') // or doing the same thing as a stream for await (const entry of fs.addAll([{ path: 'foo.txt', content: Uint8Array.from([0, 1, 2, 3]) }])) { console.info(entry) }
» npm install @helia/unixfs
Published   Aug 05, 2025
Version   5.1.0
🌐
IPFS Forums
discuss.ipfs.tech › help › helia
Implementing Helia - Helia - IPFS Forums
18 April 2023 - Super Excited for this to reduce dependency on gateways to communicate to nodes via the browser. I have a couple questions in the implementation. It seems the networking example is set up using tcp which doesn’t work for in browser. I found an example in the libp2p library on how to setup ...