saveToIpfs (files) {
    let btfsId
    this.btfs.add([...files], { chunker : "reed-solomon-1-1-262144" })
        .then((response) => {
          console.log(response)
          btfsId = response[0].hash
          console.log(btfsId)
          this.setState({ added_file_hash: btfsId })
        }).catch((err) => {
      console.error(err)
    })
  }
// Add file to IPFS and return a CID
Add file to IPFS and return a CID
Add file to IPFS and return a CID
saveToIpfs (files) {
    let btfsId
    this.btfs.add([...files], { chunker : "reed-solomon-1-1-262144" })
        .then((response) => {
          console.log(response)
          btfsId = response[0].hash
          console.log(btfsId)
          this.setState({ added_file_hash: btfsId })
        }).catch((err) => {
      console.error(err)
    })
  }
saveToIpfs ( files ) { let btfsId this . btfs . add ( [ ... files ] , { chunker : "reed-solomon-1-1-262144" } ) . then ( ( response ) => { console . log ( response ) btfsId = response [ 0 ] . hash console . log ( btfsId ) this . setState ( { added_file_hash : btfsId } ) } ) . catch ( ( err ) => { console . error ( err ) } ) }
Add file to IPFS and return a CID
Add file to IPFS and return a CID