# Same File Produced Different CID

**URL:** <https://discuss.ipfs.tech/t/same-file-produced-different-cid/13843>\
**Category:** Uncategorized\
**Tags:** go-ipfs, files\
**Created:** [March 28, 2022, 9:47am UTC](https://discuss.ipfs.tech/t/same-file-produced-different-cid/13843 "2022-03-28T09:47:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rayswchiu](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/rayswchiu/32/6895_2.png) [@rayswchiu](https://discuss.ipfs.tech/u/rayswchiu)\
**Post date:** [March 28, 2022, 9:47am UTC](https://discuss.ipfs.tech/t/same-file-produced-different-cid/13843/1 "2022-03-28T09:47:39Z")

</div>

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 ntf.storage 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!

---

<div class="post-metadata">

**Author:** ![hector](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/hector/32/178_2.png) [@hector](https://discuss.ipfs.tech/u/hector)\
**Post date:** [March 28, 2022, 9:51am UTC](https://discuss.ipfs.tech/t/same-file-produced-different-cid/13843/2 "2022-03-28T09:51:27Z")

</div>

nft.storage uses different chunking size than default go-ipfs. I don’t know which one exactly, possibly 1MB, instead of 256KB.

---

<div class="post-metadata">

**Author:** ![rayswchiu](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/rayswchiu/32/6895_2.png) [@rayswchiu](https://discuss.ipfs.tech/u/rayswchiu)\
**Post date:** [March 28, 2022, 11:40am UTC](https://discuss.ipfs.tech/t/same-file-produced-different-cid/13843/3 "2022-03-28T11:40:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Jorropo](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/jorropo/32/3230_2.png) [@Jorropo](https://discuss.ipfs.tech/u/Jorropo)\
**Post date:** [March 28, 2022, 2:39pm UTC](https://discuss.ipfs.tech/t/same-file-produced-different-cid/13843/4 "2022-03-28T14:39:00Z")

</div>

You can use:

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

```

To get the same CID as web3 and nft .storage

---

<div class="post-metadata">

**Author:** ![Jorropo](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/jorropo/32/3230_2.png) [@Jorropo](https://discuss.ipfs.tech/u/Jorropo)\
**Post date:** [March 28, 2022, 2:40pm UTC](https://discuss.ipfs.tech/t/same-file-produced-different-cid/13843/5 "2022-03-28T14:40:39Z")

</div>

> [@rayswchiu](#):
>
> That means if i upload my days work using go-ipfs, then i upload those same files to ntf.storage as backup copies, i won’t be able to access the ntf.storage “version” if my node is offline. Is that correct?

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 web3.storage rechunking and rehashing your files, web3.storage 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 > example.car`

---

<div class="post-metadata">

**Author:** ![rayswchiu](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/rayswchiu/32/6895_2.png) [@rayswchiu](https://discuss.ipfs.tech/u/rayswchiu)\
**Post date:** [March 28, 2022, 7:51pm UTC](https://discuss.ipfs.tech/t/same-file-produced-different-cid/13843/6 "2022-03-28T19:51:30Z")

</div>

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