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
|
|
|
}
|