Intenté cargar un objeto en IPFS pero hubo un error
Input not supported. Expected Buffer|ReadableStream|PullStream|File|Array<Object> got object
este es mi codigo javascript:
let data = { name: bot, description: "", image: "https://ipfs.infura.io/ipfs/myimagehash", }; const client = ipfsClient({ host: "ipfs.infura.io", port: 5001, protocol: "https", }); try { const added = await client.add(data); const url = `https://ipfs.infura.io/ipfs/${added[0].path}`; return url; } catch (error) { console.log("Error uploading file: ", error); }ok, resolví este problema de esta manera:
let buffer = Buffer.from(JSON.stringify(this.form)); const added = await client.add(buffer);