cid accessed

pull/5370/head
aniket-engg 4 years ago committed by Aniket
parent 5c57372382
commit d07aea7473
  1. 10
      apps/remix-ide/ci/publishIpfs

@ -9,11 +9,13 @@ 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 ipfs.add(globSource(folder, { recursive: true, pin: false })) let result = await ipfs.add(globSource(folder, { recursive: true}), { pin: false })
const remoteFolder = result[result.length - 1] const remoteFolder = result[result.length - 1]
console.log('ipfs://' + remoteFolder.hash) console.log('remoteFolder ====>', remoteFolder)
console.log('https://ipfsgw.komputing.org/ipfs/' + remoteFolder.hash) const hash = remoteFolder.cid.toString()
console.log('https://gateway.ipfs.io/ipfs/' + remoteFolder.hash) console.log('ipfs://' + hash)
console.log('https://ipfsgw.komputing.org/ipfs/' + hash)
console.log('https://gateway.ipfs.io/ipfs/' + hash)
} catch (e) { } catch (e) {
console.log(e) console.log(e)
} }

Loading…
Cancel
Save