Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

141
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!