We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aad540c commit a42a6bbCopy full SHA for a42a6bb
package.json
@@ -8,7 +8,7 @@
8
"test": "tsc --noEmit"
9
},
10
"dependencies": {
11
- "ipfs-core": "^0.15.2",
+ "ipfs-core": "^0.16.0",
12
"multiformats": "^9.6.5"
13
14
"devDependencies": {
src/main.ts
@@ -28,8 +28,11 @@ export default async function main() {
28
const readFile = async (ipfs: IPFS, cid: CID): Promise<string> => {
29
const decoder = new TextDecoder()
30
let content = ''
31
+
32
for await (const chunk of ipfs.cat(cid)) {
- content += decoder.decode(chunk)
33
+ content += decoder.decode(chunk, {
34
+ stream: true
35
+ })
36
}
37
38
return content
0 commit comments