Giter Site home page Giter Site logo

Comments (4)

SOME-1HING avatar SOME-1HING commented on June 3, 2024 1

@AryanPadmanabhan I've been pretty busy lately, but I've still been trying to make some progress. However, I'm running into some problems when using the image buffer.

If anyone has any experience with this and can help me out, I'd really appreciate it! Feel free to submit a pull request (PR) if you have a fix.

from google-reverse-image-api.

SOME-1HING avatar SOME-1HING commented on June 3, 2024

@eienmojiki206 How about I add two parameters picUrl which is set to true, provides an array of image URL based on limit parameter? How does this sound?

from google-reverse-image-api.

eienmojiki206 avatar eienmojiki206 commented on June 3, 2024

@eienmojiki206 How about I add two parameters picUrl which is set to true, provides an array of image URL based on limit parameter? How does this sound?

@SOME-1HING Sounds good. But I strongly recommend editing the API so it can be more consistent. I'm assuming that the user wants to download an image from the Internet and then pass it into the API (Since the API doesn't always accept all image link formats), they might want to use the following code:

const fs = require("fs");
const url = "https://google-reverse-image-api.vercel.app/reverse";

const data = new FormData()
const image = fs.createReadStream('/path/to/image')
data.append('image', image); // instead of "imageUrl"

fetch(url, {
  method: "POST",
  body: data,
})
  .then((response) => {
    if (response.ok) {
      return response.json();
    } else {
      throw new Error("Could not perform reverse image search.");
    }
  })
  .then((data) => console.log(data))
  .catch((error) => console.error(error));

from google-reverse-image-api.

AryanPadmanabhan avatar AryanPadmanabhan commented on June 3, 2024

Has this been updated in the API? The ability to use a file of an image rather than a link.

If so, how can I use it?

from google-reverse-image-api.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.