1
0
mirror of https://github.com/fazo96/ipfs-boards synced 2025-03-14 22:08:39 +01:00
ipfs-boards/src/utils/ipfs.js

8 lines
205 B
JavaScript
Raw Normal View History

2018-02-05 22:19:54 +01:00
export async function ipfsPut(content) {
2018-02-07 21:08:53 +01:00
const obj = {
content: Buffer.from(content),
path: '/'
}
const response = await window.ipfs.files.add(obj)
return response[0].hash
2018-02-05 22:19:54 +01:00
}