Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async function detectHandwritingGCS(uri) {
// [START vision_handwritten_ocr_gcs_beta]
// Imports the Google Cloud client libraries
const vision = require('@google-cloud/vision').v1p3beta1;
const fs = require('fs');
// Creates a client
const client = new vision.ImageAnnotatorClient();
/**
* TODO(developer): Uncomment the following line before running the sample.
*/
// const uri = `gs://bucket/bucketImage.png`;
const request = {
image: {
content: fs.readFileSync(uri),
},
feature: {
languageHints: ['en-t-i0-handwrit'],