은승우

Update app.js

Showing 1 changed file with 2 additions and 2 deletions
......@@ -87,7 +87,7 @@ async function handleEvent(event) {
.then((stream) => {
stream.on('data', (chunk) => {
const fs = require('fs');
fs.writeFileSync('./photo/image.png',chunk);
fs.writeFileSync('image.png',chunk);
});
});
var cheerio = require('cheerio');
......@@ -104,7 +104,7 @@ async function handleEvent(event) {
'Content-Type': 'application/json',
'Ocp-Apim-Subscription-Key': '979dc5d63344438fa4701c62feebb7dc'
},
body: fs.readFileSync('./photo/image.png')
body: fs.readFileSync('image.png')
};
console.log(body);
request.post(options, function (error, response, body) {
......