Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
付智勇
/
koa2_Sequelize_project
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
付智勇
8 years ago
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
bf7d95444676977f7e63ce5a158d4117a3eca30b
bf7d9544
1 parent
d5eb1ddc
no message
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
9 行增加
和
4 行删除
routes/upload.js
routes/upload.js
查看文件 @
bf7d954
...
...
@@ -36,10 +36,15 @@ router.post('/tgpCallback', async (ctx, next) => {
//let s = await uploaddemo(ctx.req,ctx.res,next)
//let w = await fs.rename('/Users/fzy/project/koa2_Sequelize_project/uploads/'+'19543f72d9682d0bedf67fc98da4597b','/Users/fzy/project/koa2_Sequelize_project/uploads/'+'www.jpg')
let
f
=
await
fs
.
appendFileSync
(
path
.
join
(
__dirname
,
'tgp.txt'
),
JSON
.
stringify
(
ctx
.
request
.
body
)
+
'/n'
)
ctx
.
body
=
{
filename
:
2
}
try
{
let
f
=
await
fs
.
appendFileSync
(
path
.
join
(
__dirname
,
'tgp.txt'
),
JSON
.
stringify
(
ctx
.
request
.
body
)
+
'/n'
)
ctx
.
response
.
status
=
200
;
ctx
.
body
=
{
"code"
:
0
}
}
catch
(
error
)
{
ctx
.
response
.
status
=
400
;
ctx
.
body
=
{}
}
})
...
...
请
注册
或
登录
后发表评论