INFURA / infura

Official Public Repository for INFURA
https://infura.io
381 stars 62 forks source link

Error occur when ipfs.add() #218

Open goddev1026 opened 2 years ago

goddev1026 commented 2 years ago

Hell, everyone. I uploaded metadata using ipfs.add, but an error occurred.

// Code

const ipfsClient = require("ipfs-http-client") const ipfs = ipfsClient({ host: "ipfs.infura.io", port: 5001, apiPath: "/api/v0", protocol: "https" }) const cid = await ipfs.add(Buffer.from(JSON.stringify(tokenObject))); console.log(cid);

//ERROR

image

priti104 commented 1 year ago

Hell, everyone. I uploaded metadata using ipfs.add, but an error occurred.

// Code

const ipfsClient = require("ipfs-http-client") const ipfs = ipfsClient({ host: "ipfs.infura.io", port: 5001, apiPath: "/api/v0", protocol: "https" }) const cid = await ipfs.add(Buffer.from(JSON.stringify(tokenObject))); console.log(cid);

//ERROR

image

how did you solve it?