today, in my project, ipfs.add() is not work. when i upload file, it return timed out…
this is my code:
//Declare IPFS
const ipfsClient = require(‘ipfs-http-client’)
const ipfs = ipfsClient({ host: ‘ipfs.infura.io’, port: 5001, protocol: ‘https’ })
//Upload video
uploadVideo = title => {
console.log("submit to ipfs")
ipfs.add(this.state.buffer, (error, result) => {
console.log("IPFS result: ", result)
if(error){
console.log("error: ", error)
return
}
})
}
Many thanks.