如何使用 IPFS CID 创建子文件夹?
我正在尝试部署 NFT。它是 mfers 合约的副本。 mfers 合约的代币 URI 引用为 ipfs://QmWiQE65tmpYzcokCheQmng2DCM33DEhjXcPB6PanwpAZo/#
其中 # 是代币编号。在所有令牌中,ipfs 哈希 QmWiQE65tmpYzcokCheQmng2DCM33DEhjXcPB6PanwpAZo 是相同的。你如何在 ipfs 中设置这样的东西?请注意,ipfs URL 返回一个 json 对象。提前致谢。
I'm trying to deploy an NFT. It's a replica from the mfers contract. The mfers contract has the token URI referenced as ipfs://QmWiQE65tmpYzcokCheQmng2DCM33DEhjXcPB6PanwpAZo/#
Where # is the token number. Across all tokens, the ipfs hash QmWiQE65tmpYzcokCheQmng2DCM33DEhjXcPB6PanwpAZo is the same. How do you set something like this up in ipfs? Note that ipfs URL returns a json object. Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您直接与 IPFS 交互,可变文件系统 API< /a> 抽象出创建目录/子目录的过程,将 IPFS 视为文件系统。这不是 IPFS 的工作方式,但它是 IPFS 之上的更直观的层。
如果您通过 NFT.storage API 或客户端上传,您可能需要查看
uploadDirectory
示例。另请参阅:https://gist.github.com/tougerthao/9452b85fcb1f2b2b129c43dd5ecdc885
If you are interacting with IPFS directly, Mutable File System API abstract away the process of creating directories/subdirectories, treating IPFS as a file system. It isn't how IPFS works, but it is a more intuitive layer on top of IPFS.
If you're uploading via NFT.storage API or client, you might want to check out an
uploadDirectory
example.See also: https://gist.github.com/tougerthao/9452b85fcb1f2b2b129c43dd5ecdc885