web3.storage icon indicating copy to clipboard operation
web3.storage copied to clipboard

Ability to upload (split) CAR files using webUI

Open hsn10 opened this issue 3 years ago • 3 comments

Because most times you need to split CAR file into smaller parts (100MB) to get around upload limit, some way of signalling if all chunks from root CID got uploaded is needed in CAR upload form.

Probably good to add some signalling to JS API too. You upload bunch of CAR files using JS API and get error - few chunks are missing.

hsn10 avatar Jul 06 '22 15:07 hsn10

This needs prioritization and design work to create a plan on how to split cars without exploding browser memory.

Today, we recommend using JS Client or w3 CLI for this kind of use cases.

vasco-santos avatar Aug 15 '22 14:08 vasco-santos

Probably good to add some signalling to JS API too. You upload bunch of CAR files using JS API and get error - few chunks are missing.

Can you give us more information on this bit @hsn10 ?

vasco-santos avatar Aug 15 '22 14:08 vasco-santos

In CAR file there is one or more root nodes. Probably only one root is supported by most tools.

There needs to be API for:

  1. if I give it local CAR file it will return root CID.
  2. query status of uploaded root CID. it will tell me if everything linked from this root is correctly uploaded using split CAR parts. if everything is uploaded then IPFS will pin root on DAG IMPORT. So if CID is pinned then return true.
  3. server will need to keep CAR file with root around and after each CAR part upload it will need to retry to dag import root CAR to check if all parts are already uploaded. If root gets pinned, all parts are there.
  4. I assume that CAR parts holding additional data which will link to CAR file with root will have zero root, so we can detect if uploaded CAR file is supposed to be the main one or its additional data.

hsn10 avatar Aug 15 '22 15:08 hsn10