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:40:56 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6ad478a57d8692716f030c8397f721e826d21635
6ad478a5
1 parent
94b4bd0c
Update app.js
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
12 deletions
app.js
app.js
View file @
6ad478a
...
...
@@ -85,19 +85,11 @@ async function handleEvent(event) {
client
.
getMessageContent
(
event
.
message
.
id
)
.
then
((
stream
)
=>
{
stream
.
on
(
'data'
,
(
chunk
)
=>
{
console
.
log
(
chunk
);
fs
.
writeFileSync
(
'./photo/image.png'
,
chunk
,
function
(
err
)
{
if
(
err
)
{
console
.
log
(
'에러발생'
);
console
.
dir
(
err
);
return
;
}
});
var
file
=
fs
.
readFileSync
(
'./photo/image.png'
,
'application/json'
,
function
(
err
,
data
)
{
//파일 다 읽었을 대 호출 됨
client
.
replyMessage
(
event
.
replyToken
,
chunk
).
then
(
resolve
).
catch
(
reject
);
});
console
.
log
(
file
);
var
cheerio
=
require
(
'cheerio'
);
var
cheerio
=
require
(
'cheerio'
);
var
uriBase
=
'https://koreacentral.api.cognitive.microsoft.com/vision/v2.1/ocr'
;
var
options
=
{
...
...
Please
register
or
login
to post a comment