Same File Produced Different CID

I use go-ipfs webui to upload a file and it produced a v0 CID starting with “Qm*”.

Using the same file i uploaded it to and got a v1 CID starting with “baf*”

Then I use CID Inspector to procure a v1 CID from my v0 CID and it turned out that the 2 v1 CID were not the same.

Aren’t they are suppose the same given the same content? I’m so confused here! uses different chunking size than default go-ipfs. I don’t know which one exactly, possibly 1MB, instead of 256KB.

That means if i upload my days work using go-ipfs, then i upload those same files to as backup copies, i won’t be able to access the “version” if my node is offline. Is that correct?

You can use:

ipfs add --raw-leaves --chunker=size-1048576 --recursive files/

To get the same CID as web3 and nft .storage

Yes you cannot, different CID == different files as far as IPFS is concerned.

You should upload .car instead. (they are archive of IPFS blocks so instead of rechunking and rehashing your files, is just gonna store the exact same block that your home node produced)
You can export a .car from your node with ipfs dag export Qmfoo >

1 Like

You’re a life saver. That’s what i’m looking for, thank you so much!