ipfs/kubo

Verify a file/folder

Open

#9172 aperta il 8 ago 2022

Vedi su GitHub
 (14 commenti) (0 reazioni) (0 assegnatari)Go (2725 fork)batch import
P4exp/experthelp wantedkind/feature

Metriche repository

Star
 (13.906 star)
Metriche merge PR
 (Merge medio 4g 2h) (28 PR mergiate in 30 g)

Descrizione

Checklist

  • My issue is specific & actionable.
  • I am not suggesting a protocol enhancement.
  • I have searched on the issue tracker for my issue.

Description

It would be nice if I could supply a CID like a regular SHA hash and a file/folder and let kubo fetch the necessary metadata and check the local data for errors.

Rationale

I wrote a feature request for the usage of Kubo in Lutris and I noticed that this would be kinda neat, as they may want to fetch downloads via http(s) and only if this fails fetch them via ipfs.

This way they don't need a hash and a CID, but could just use the CID and have the URL once imported via URL-Store.

Usage

kubo verify --file=/path/to/file /ipfs/CID
kubo verify --ignore-auxiliary=1 --folder=/path/to/folder/ /ipfs/CID 

(Where --ignore-auxiliary=1 in the folder version would ignore any additional files/folders like .git)

kubo verify /ipfs/CID

Would work analog to kubo get where it would search in the ./$CID folder for the file/folder structure.

Edit: Fix language

Guida contributor