/hyperpost/🧊/me/experiment/~/peer.suite.space.instant-co-laboration/
@plex
I've been doing a brave.search?helia upload string to IPFS desktop https://bafybeievzg2vy5wxhk6jjcc2ob54ejenbcavei3tcbe2ztnyk72pknl4zm.ipfs.dweb.link/?filename=helia%20upload%20string%20to%20IPFS%20desktop%20-%20Brave%20Search%20(12_16_2025%2010%EF%BC%9A27%EF%BC%9A36%20PM).html
Wanted to document all this
Doing it all in Peergos, as this is the one that gives me ready made permanence, it is also searchable
Now comes the rea test
what happens if i copy paste the document as shown in the screenshot
Of course copy pasting the document looses its formatting
Let;s hopw that the straegy described there will work
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);