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
* feat: more usage examples for helia unixfs
* deps: update to fix port binding errors
* refine eamples
* feat: add an additional example
* feat: 401 providing, gc and pinning
* chore: remove unused deps
* chore: lint
* test: add simple test for 401 example
* deps: upgrade
* feat: add extended dag stats
* Update examples/helia-101/101-basics.js
* Update examples/helia-101/101-basics.js
Co-authored-by: Alex Potsides <[email protected]>
* chore: stop helia so the process exits
---------
Co-authored-by: Daniel N <[email protected]>
Co-authored-by: Alex Potsides <[email protected]>
// this decoder will turn Uint8Arrays into strings
34
53
constdecoder=newTextDecoder()
35
54
lettext=''
36
55
56
+
// Read the file into memory and print it to the console
37
57
forawait(constchunkoffs.cat(cid,{
38
58
onProgress: (evt)=>{
39
59
console.info('cat event',evt.type,evt.detail)
@@ -43,5 +63,28 @@ for await (const chunk of fs.cat(cid, {
43
63
stream: true
44
64
})
45
65
}
46
-
47
66
console.log('Added file contents:',text)
67
+
68
+
// Add a file to Helia from a URL
69
+
// Helia will download, and add the file into smaller chunks and return a directory containing a file node `2600-h.htm` with links to the raw blocks of the file
0 commit comments