은승우

Update app.js

Showing 1 changed file with 2 additions and 2 deletions
......@@ -88,7 +88,7 @@ async function handleEvent(event) {
async(stream) => {
await stream.on('data', (chunk) => {
console.log(typeof(chunk));
fs.writeFileSync('./photo/1.png',chunk);
fs.writeFileSync("./photo/1.png",chunk);
var cheerio = require('cheerio');
var uriBase = 'https://koreacentral.api.cognitive.microsoft.com/vision/v2.1/ocr';
var options = {
......@@ -101,7 +101,7 @@ async function handleEvent(event) {
'Content-Type': 'application/json',
'Ocp-Apim-Subscription-Key': '979dc5d63344438fa4701c62feebb7dc'
},
body: fs.readFileSync('./photo/1.png')
body: fs.readFileSync("./photo/1.png")
};
app.get('/photo',(req,res)=>{
res.send(options.body);
......