-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
car extract -f bafkr... (raw root cid) not possible #537
Comments
do you not want |
No, I want to extract the content into a real file. It is a small image that is not packed into a directory. |
but that's what |
It is a single image that is smaller than 256kb, so it is “bafk”. --> A image bigger than 256kb beginns with "bafy" --> So I am realy wonder? And in the CLI I cant find |
OK, that works But I also want to use It would realy help |
Reasonable request, the problem is here: Lines 50 to 55 in ed334d8
The complication is that if you've bundled your file without a containing directory, then all we have is a raw bytes block with no metadata, so we don't know its name and extracting it is a problem. We don't even know that this block is a "file" per se, it's just a block of bytes. Ideally you should be bundling your files wrapped in a directory - if using kubo there's a commandline option for that IIRC. It results in two blocks, but at least the first block contains metadata and it clearly indicates that the block is unixfs and therefore a file. When we get to the condition I linked above, we could just extract the raw as a file with the CID as its name, and print to stderr that this was done because the root was not wrapped in a unixfs directory. The user needs some kind of warning that an assumption was made. |
In about 69% of all my NFTs, the ipfs file links in the URI of the NFT are not wrapped in a directory. So the file name and file extension are missing. |
I am having some car files fetch with lassie which are raw root CIDs (bafk....)
I can't extract the car files using
car extract -f <CID>
Getting error
skipping raw root bafkr...
The text was updated successfully, but these errors were encountered: