This repository was archived by the owner on Jul 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 134
This repository was archived by the owner on Jul 20, 2023. It is now read-only.
Using Buffer doesn't work #9
Copy link
Copy link
Closed
Labels
🚨This issue needs some love.This issue needs some love.api: visionIssues related to the googleapis/nodejs-vision API.Issues related to the googleapis/nodejs-vision API.triage meI really want to be triaged.I really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Environment details
- OS: OSX
- Node.js version: v6.11.4
- npm version: 3.10.10
- @google-cloud/vision version: ^0.13.0
Steps to reproduce
I have a firebase function, that accepts base64 string, then convert it to buffer.
Everything runs with no problem, but the response from Vision API is always an empty array. I pass the same image with the file path, I got a correct response.
here my is an example
// req.base64data is a string from the client using FileReader API
client
.faceDetection( new Buffer(req.base64data,'base64'))
.then(results => {
const faces = results[0].faceAnnotations;
console.log("RESULT:", faces.length);
return res.send({data:faces.length});
})
.catch(err => {
console.error('ERROR:', err);
});
```
Thanks!Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
🚨This issue needs some love.This issue needs some love.api: visionIssues related to the googleapis/nodejs-vision API.Issues related to the googleapis/nodejs-vision API.triage meI really want to be triaged.I really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.