Comments (4)
@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.
@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 How about I add two parameters
picUrl
which is set to true, provides an array of image URL based onlimit
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from google-reverse-image-api.