Showing
1 changed file
with
2 additions
and
5 deletions
... | @@ -88,10 +88,7 @@ async function handleEvent(event) { | ... | @@ -88,10 +88,7 @@ async function handleEvent(event) { |
88 | console.log(chunk); | 88 | console.log(chunk); |
89 | var cheerio = require('cheerio'); | 89 | var cheerio = require('cheerio'); |
90 | 90 | ||
91 | - let subscriptionKey = process.env['COMPUTER_VISION_SUBSCRIPTION_KEY']; | 91 | + var uriBase = 'https://koreacentral.api.cognitive.microsoft.com/vision/v2.1/ocr'; |
92 | - let endpoint = process.env['COMPUTER_VISION_ENDPOINT']; | ||
93 | - console.log(subscriptionKey); | ||
94 | - var uriBase = endpoint + 'vision/v2.1/ocr'; | ||
95 | var options = { | 92 | var options = { |
96 | uri: uriBase, | 93 | uri: uriBase, |
97 | qs: { | 94 | qs: { |
... | @@ -101,7 +98,7 @@ async function handleEvent(event) { | ... | @@ -101,7 +98,7 @@ async function handleEvent(event) { |
101 | }, | 98 | }, |
102 | headers: { | 99 | headers: { |
103 | 'Content-Type': 'application/octet-stream', | 100 | 'Content-Type': 'application/octet-stream', |
104 | - 'Ocp-Apim-Subscription-Key': subscriptionKey | 101 | + 'Ocp-Apim-Subscription-Key': '979dc5d63344438fa4701c62feebb7dc' |
105 | }, | 102 | }, |
106 | body: chunk | 103 | body: chunk |
107 | }; | 104 | }; | ... | ... |
-
Please register or login to post a comment