ipfs-only-hash 和 JavaScript
有人可以帮我做“仅IPFS的锤子”吗?我对JavaScript我很新,不知道如何将其添加到我的HTML和JS文件中...
我需要计算图像文件的IPFS哈希(例如,使用< lt; input type =“ file”。 。>)。 我发现的是'ipfs-inly-hash',及其可能的实现(在这里 - 字符串的哈希):
const Hash = require('ipfs-only-hash')
Hash.of('hi').then(console.log)
但是我在“ require”上遇到了所有的错误,试图将其更改为“ IPFS-folly-hash”'''',然后再次出现错误...我在HTML-JS文件中使用它?
Could somebody help me with 'ipfs-only-hash'? I'm pretty new with JavaScript and do not know how to add it to my html and js files...
I need to calculate an IPFS hash of the image file (for example, upload with <input type="file" ..>).
What I found is 'ipfs-only-hash', and its possible implementation (here - hash of the string):
const Hash = require('ipfs-only-hash')
Hash.of('hi').then(console.log)
But I got all the time errors on "require", tried to change it to 'import Hash from "ipfs-only-hash"', and again got errors... Where and how should I use it in my html-js files?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论