【发布时间】:2023-02-01 20:11:40
【问题描述】:
我正在开发 NFT 市场。 我有一些错误:POST https://ipfs.infura.io:5001/api/v1/add?stream-channels=true&progress=false net::ERR_CONNECTION_TIMED_OUT
你能教我吗?
这是我的代码。
async function onChange(e) {
const file = e.target.files[0]
try {
const added = await client.add(
file,
{
progress: (prog) => console.log(`received: ${prog}`)
}
)
const url = `https://ipfs.infura.io/ipfs/${added.path}`
setFileUrl(url)
} catch (error) {
console.log('Error uploading file: ', error)
}
}
【问题讨论】:
标签: reactjs ethereum web3js marketplace