Toggle navigation
Toggle navigation
This project
Loading...
Sign in
은승우
/
LINEBOT
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
은승우
2019-12-05 14:23:17 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
73c8eb6dd435f9cb64af1bed21c4d838e86c8372
73c8eb6d
1 parent
7600e096
Update app.js
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
app.js
app.js
View file @
73c8eb6
...
...
@@ -86,8 +86,17 @@ async function handleEvent(event) {
.
then
((
stream
)
=>
{
stream
.
on
(
'data'
,
(
chunk
)
=>
{
console
.
log
(
chunk
);
var
file
=
fs
.
createReadStream
(
chunk
);
console
.
log
(
file
);
fs
.
writeFileSync
(
'./photo/image.png'
,
chunk
,
function
(
err
)
{
if
(
err
)
{
console
.
log
(
'에러발생'
);
console
.
dir
(
err
);
return
;
}
});
var
file
=
fs
.
readFileSync
(
'./photo/image.png'
,
'utf8'
,
function
(
err
,
data
)
{
//파일 다 읽었을 대 호출 됨
});
console
.
log
(
file
);
var
cheerio
=
require
(
'cheerio'
);
var
uriBase
=
'https://koreacentral.api.cognitive.microsoft.com/vision/v2.1/ocr'
;
...
...
Please
register
or
login
to post a comment