Preserve only one file of a large directory CID (/ipfs/<CID>/filename.png)
chrische
Example:
NFT is pointing to the image uri: ipfs://QmP1ZHxFArEBJM6DPKLW8hsm93CoiYvidJDp7pSkPVsmDw/8738_3.png
The CID (QmP1ZHxFArEBJM6DPKLW8hsm93CoiYvidJDp7pSkPVsmDw) is a CID directory of the collection containing many files. Size is 1.1 GB
Is it possible to preserve only one file (./8738_3.png) of the CID directory, which is only 22.8 kB in size? Or does the entire CID directory have to be backed up, as the URI of the NFT contains it? /ipfs/<CID>/image.png
As a note
Using lassie fetech you can also download only the single file as a car.
lassie fetch QmP1ZHxFArEBJM6DPKLW8hsm93CoiYvidJDp7pSkPVsmDw/8738_3.png
The csv would then have to support the following structure:
tokenID, cid
000813886377BBDA772433D7FCF16A9710D9D958D9F7129F1353F82200008886, QmP1ZHxFArEBJM6DPKLW8hsm93CoiYvidJDp7pSkPVsmDw/8738_3.png
Content integrity can only be established saving the entire CID directory only that way rebuilding of CID is possible. So I don't think preseving only one file of a CID directory is not possible? Or is it?
chrische
it makes no sense.
Example in the NFT the URI is:
ipfs://QmP1ZHxFArEBJM6DPKLW8hsm93CoiYvidJDp7pSkPVsmDw/8655_1.png
Now imagine the complete collection CID QmP1ZHxFArEBJM6DPKLW8hsm93CoiYvidJDp7pSkPVsmDw (1,1GB) lost pinning.
It is not enough to upload the file “8655_1.png” with the CID QmefhwxcCH78JVy7m5MRo6kpN1Ew5qgVRSEtD298FuNFF2 with 25kb to a pinning service, because it only gets the CID QmefhwxcCH78JVy7m5MRo6kpN1Ew5qgVRSEtD298FuNFF2.
The link in the NFT will still not resolve because there is no link to QmefhwxcCH78JVy7m5MRo6kpN1Ew5qgVRSEtD298FuNFF2.
You need to understand how IPFS works.
When I want to recover the link I need to upload the complete CID QmP1ZHxFArEBJM6DPKLW8hsm93CoiYvidJDp7pSkPVsmDw with 1,1GB.
or
But it is also possible to save the single file including the directory structure of QmP1ZHxFArEBJM6DPKLW8hsm93CoiYvidJDp7pSkPVsmDw in a car file with:
https://ipfs.io/ipfs/QmP1ZHxFArEBJM6DPKLW8hsm93CoiYvidJDp7pSkPVsmDw/8655_1.png?format=car
This car file have a size of 42,5kb and include the complete directory QmP1ZHxFArEBJM6DPKLW8hsm93CoiYvidJDp7pSkPVsmDw and the file 8655_1.png.
When I recover this car file QmP1ZHxFArEBJM6DPKLW8hsm93CoiYvidJDp7pSkPVsmDw_8655_1.png.car with 42,5kb the link in the NFT will resolve, also when the complete collection CID with 1,1GB lost pinning.
E
Elizabeth
Yes, this is possible today! You can back up select CIDs from a directory with NFT.Storage.
To retrieve the data, instead of
ipfs://QmP1ZHxFArEBJM6DPKLW8hsm93CoiYvidJDp7pSkPVsmDw/8655_1.png use this https://ipfs.io/ipfs/QmP1ZHxFArEBJM6DPKLW8hsm93CoiYvidJDp7pSkPVsmDw/
then cid will show up