Closed ghost closed 3 years ago
The file is ~4 MB and I get multiple blocks in the IndexedDB after downloading:
CID with different parameters than what we have hard coded: https://cid.ipfs.io/#bafykbzacecp5ijz6n2hoy6nwferyxajnnftfny52kntbmqv5ywo734yivekw4
Source code of this website above that decodes the CID: https://github.com/multiformats/cid-utils-website
Hard coded part that needs to receive parameters from the decoded CID: https://github.com/filecoin-shipyard/browser-retrieval/blob/57360727c142399f0560df10848c9a1787ab0c49/src/background/socket-client/SocketClient.js#L105
We need:
0
or 1
)sha256
or blake2b-256
)true
if multicodec = raw
; undefined
otherwise){
cidVersion: 1 | 0,
hashAlg: 'blake2b-256' | 'sha256',
rawLeaves: true | undefined
}
UPDATE:
format = decoded.codec
rawLeaves = decoded.codec === 'raw'
this.datastore.putContent(this.importSink, { cidVersion: decode.version, hashAlg: decode.hashAlg, format, rawLeaves });
We're still broken on dag-pb
CIDs. Examples: bafykbzaceb7xzlm65omwugcavfxxcxclhnwamjbcodz5rz4kbyhenq7m4pivg
, bafykbzacecp5ijz6n2hoy6nwferyxajnnftfny52kntbmqv5ywo734yivekw4
@aistoc Here are some CIDs that do work:
Here are some CIDs that do not work:
When I say that it "works" or not, I am talking about the blue download arrow after the transfer finishes. You can see in the code how we are generating the link for that icon.
Steps to Reproduce
Get the current browser extension and make sure to use
wsEndpoint
="wss://retrievalproxy.browser-retrieval.filecoin.io:443"
Retrieve this from storage miner:
CID
:bafykbzacecp5ijz6n2hoy6nwferyxajnnftfny52kntbmqv5ywo734yivekw4
Miner
:f019243
The retrieval should not take too long since it will be in the
files
cache onretrievalproxy.browser-retrieval.filecoin.io
. The total bytes of this CID are4194304
.However, the blue download arrow will not work and will give the message shown above
Download failed: Key not found in database