fix(handleFileUpload): reliably pin and announce uploaded directory CID #39
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When uploading large files via
handleFileUpload
, the CID is generated locally but never shows up on the public DHT (IPFS Checker reports “0 working providers”).What we tried
unixfs.addAll()
, we nownode.pins.add(rootCid)
)await node.routing.provide(rootCid)
)Console:
Files:
ipfs-handler:
peersky-browser/src/protocols/ipfs-handler.js
Line 73 in 4f4d2f7
libp2p: https://github.com/p2plabsxyz/peersky-browser/blob/fix/enable-dht-provider/src/protocols/helia/libp2p.js
Current behavior:
Despite those calls, the checker still reports zero providers for the CID:
Http gateway: https://bafybeidthg7n5lg67eawgyxtliftty2aeebs3a4fhw7wcbf2trlz2f7iem.ipfs.dweb.link/
IPFS check: https://check.ipfs.network/?cid=bafybeidthg7n5lg67eawgyxtliftty2aeebs3a4fhw7wcbf2trlz2f7iem