은승우

Update app.js

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