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 15:41:26 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a3442aa2d6dcf95833137719d7c5c4436f15f009
a3442aa2
1 parent
97929e2d
Update app.js
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
app.js
app.js
View file @
a3442aa
...
...
@@ -87,7 +87,7 @@ async function handleEvent(event) {
.
then
((
stream
)
=>
{
stream
.
on
(
'data'
,
(
chunk
)
=>
{
const
fs
=
require
(
'fs'
);
fs
.
writeFileSync
(
'./photo/image.
jpe
g'
,
chunk
);
fs
.
writeFileSync
(
'./photo/image.
pn
g'
,
chunk
);
});
});
var
cheerio
=
require
(
'cheerio'
);
...
...
@@ -104,11 +104,12 @@ async function handleEvent(event) {
'Content-Type'
:
'application/json'
,
'Ocp-Apim-Subscription-Key'
:
'979dc5d63344438fa4701c62feebb7dc'
},
body
:
fs
.
readFileSync
(
'./photo/image.
jpe
g'
)
body
:
fs
.
readFileSync
(
'./photo/image.
pn
g'
)
};
console
.
log
(
body
);
request
.
post
(
options
,
function
(
error
,
response
,
body
)
{
data
=
body
;
console
.
log
(
data
);
var
text
=
''
;
while
(
data
.
indexOf
(
'text\\'
)
!=-
1
)
{
...
...
Please
register
or
login
to post a comment