Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

144
Vistas
upload an object on IPFS with JavaScript

I tried to upload an object into IPFS but there was an error

Input not supported. Expected Buffer|ReadableStream|PullStream|File|Array<Object> got object

this is my javascript code :

     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);
      }
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

ok I solved this problem this way:

let buffer = Buffer.from(JSON.stringify(this.form));
const added = await client.add(buffer);
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda