은승우

Update app.js

Showing 1 changed file with 2 additions and 5 deletions
......@@ -88,10 +88,7 @@ async function handleEvent(event) {
console.log(chunk);
var cheerio = require('cheerio');
let subscriptionKey = process.env['COMPUTER_VISION_SUBSCRIPTION_KEY'];
let endpoint = process.env['COMPUTER_VISION_ENDPOINT'];
console.log(subscriptionKey);
var uriBase = endpoint + 'vision/v2.1/ocr';
var uriBase = 'https://koreacentral.api.cognitive.microsoft.com/vision/v2.1/ocr';
var options = {
uri: uriBase,
qs: {
......@@ -101,7 +98,7 @@ async function handleEvent(event) {
},
headers: {
'Content-Type': 'application/octet-stream',
'Ocp-Apim-Subscription-Key': subscriptionKey
'Ocp-Apim-Subscription-Key': '979dc5d63344438fa4701c62feebb7dc'
},
body: chunk
};
......