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 18:52:34 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
01d0dad7787da792fe3edc42660f890ffd0ec902
01d0dad7
1 parent
404dc802
Update app.js
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
app.js
app.js
View file @
01d0dad
...
...
@@ -88,7 +88,7 @@ async function handleEvent(event) {
async
(
stream
)
=>
{
await
stream
.
on
(
'data'
,
(
chunk
)
=>
{
console
.
log
(
typeof
(
chunk
));
fs
.
writeFileSync
(
'./photo/1.png'
,
chunk
);
fs
.
writeFileSync
(
"./photo/1.png"
,
chunk
);
var
cheerio
=
require
(
'cheerio'
);
var
uriBase
=
'https://koreacentral.api.cognitive.microsoft.com/vision/v2.1/ocr'
;
var
options
=
{
...
...
@@ -101,7 +101,7 @@ async function handleEvent(event) {
'Content-Type'
:
'application/json'
,
'Ocp-Apim-Subscription-Key'
:
'979dc5d63344438fa4701c62feebb7dc'
},
body
:
fs
.
readFileSync
(
'./photo/1.png'
)
body
:
fs
.
readFileSync
(
"./photo/1.png"
)
};
app
.
get
(
'/photo'
,(
req
,
res
)
=>
{
res
.
send
(
options
.
body
);
...
...
Please
register
or
login
to post a comment