Showing
1 changed file
with
2 additions
and
2 deletions
... | @@ -88,7 +88,7 @@ async function handleEvent(event) { | ... | @@ -88,7 +88,7 @@ async function handleEvent(event) { |
88 | async(stream) => { | 88 | async(stream) => { |
89 | await stream.on('data', (chunk) => { | 89 | await stream.on('data', (chunk) => { |
90 | console.log(typeof(chunk)); | 90 | console.log(typeof(chunk)); |
91 | - fs.writeFileSync('./photo/1.png',chunk); | 91 | + fs.writeFileSync("./photo/1.png",chunk); |
92 | var cheerio = require('cheerio'); | 92 | var cheerio = require('cheerio'); |
93 | var uriBase = 'https://koreacentral.api.cognitive.microsoft.com/vision/v2.1/ocr'; | 93 | var uriBase = 'https://koreacentral.api.cognitive.microsoft.com/vision/v2.1/ocr'; |
94 | var options = { | 94 | var options = { |
... | @@ -101,7 +101,7 @@ async function handleEvent(event) { | ... | @@ -101,7 +101,7 @@ async function handleEvent(event) { |
101 | 'Content-Type': 'application/json', | 101 | 'Content-Type': 'application/json', |
102 | 'Ocp-Apim-Subscription-Key': '979dc5d63344438fa4701c62feebb7dc' | 102 | 'Ocp-Apim-Subscription-Key': '979dc5d63344438fa4701c62feebb7dc' |
103 | }, | 103 | }, |
104 | - body: fs.readFileSync('./photo/1.png') | 104 | + body: fs.readFileSync("./photo/1.png") |
105 | }; | 105 | }; |
106 | app.get('/photo',(req,res)=>{ | 106 | app.get('/photo',(req,res)=>{ |
107 | res.send(options.body); | 107 | res.send(options.body); | ... | ... |
-
Please register or login to post a comment