ipfs-cluster / ipfs-cluster

Pinset orchestration for IPFS
https://ipfscluster.io
Other
1.49k stars 288 forks source link

Pinning multiple files when adding multiple files like Kubo #1946

Open tkb2501 opened 1 year ago

tkb2501 commented 1 year ago

Hi Team,

I'm trying to add multiple files simultaneously in IPFS-cluster node but the issue is that only a single CID is being pinned to the cluster while other CIDs are not getting pinned.

Although I'm able to access those files using GET api call but why it isn't pinning all the CIDs?

hsanjuan commented 1 year ago

Per https://discuss.ipfs.tech/t/pinning-issue-while-adding-multiple-files/16612/2?u=hector, only the last file added in a multipart request is pinned.

I'm not sure why it was done this way. I can speculate that there is no good way to differentiate between adding a folder with files and adding many files. When adding a folder that has files inside, then only the last root CID should be pinned, and not every single part of the multipart should be pinned. I am not sure how Kubo makes a difference here but we should replicate the behaviour.