Commit 883ec0ae authored by aniket-engg's avatar aniket-engg Committed by Aniket

inspect result

parent f6417bc8
...@@ -10,9 +10,10 @@ const folder = process.cwd() + '/temp_publish_docker'; ...@@ -10,9 +10,10 @@ const folder = process.cwd() + '/temp_publish_docker';
const host = 'ipfs.komputing.org' // ethdev berlin ipfs node const host = 'ipfs.komputing.org' // ethdev berlin ipfs node
const ipfs = IpfsHttpClient({ host, port: 443, protocol: 'https' }) const ipfs = IpfsHttpClient({ host, port: 443, protocol: 'https' })
try { try {
let result = await all(ipfs.add(globSource(folder, { recursive: true}), { pin: false })) let result = await ipfs.add(globSource(folder, { recursive: true}), { pin: false })
console.log('result ====>', result) console.log('result ====>', result)
const remoteFolder = result[result.length - 1] const remoteFolder = result
// const remoteFolder = result[result.length - 1]
console.log('remoteFolder ====>', remoteFolder) console.log('remoteFolder ====>', remoteFolder)
const hash = remoteFolder.cid.toString() const hash = remoteFolder.cid.toString()
console.log('ipfs://' + hash) console.log('ipfs://' + hash)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment