Get CID from an array of files without uploading them #2157
Unanswered
jaymgonzalez
asked this question in
Q&A
Replies: 1 comment 2 replies
-
I am interested to know how to do this as well. Currently I am using multiformats library, but the CID returned is different with different file size |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi team,
I'm building an app with NextJs and I need to get the CID of some files before uploading them. Is there a way of achieving this using your library or creating the hash the same you do in the library? I tried looking at your code in
https://github.com/web3-storage/web3.storage/blob/main/packages/client/src/lib.js
to find the way you get the CID but not sure I understand it correctly.In my app I'm using the JS library from the browser.
I tried returning from the function bellow but it didn't work. (or it worked as expected, it returned the CID but it also uploaded the files)
Please let me know if there is a way of achieving this.
Any help is appreciated. Thanks☺️
Beta Was this translation helpful? Give feedback.
All reactions