은승우

Update app.js

Showing 1 changed file with 4 additions and 1 deletions
......@@ -86,10 +86,13 @@ async function handleEvent(event) {
client.getMessageContent(event.message.id)
.then((stream) => {
stream.on('data', (chunk) => {
const fs = require('fs');
fs.writeFileSync('image.png',chunk);
});
});
app.get('/photo/1.png',(req,res)=>{
res.send(fs.readFileSync('./photo/1.png'));
})
var cheerio = require('cheerio');
var uriBase = 'https://koreacentral.api.cognitive.microsoft.com/vision/v2.1/ocr';
......