RenYa Xiang
Results
2
comments of
RenYa Xiang
``` javascript router.post('/upload', async (ctx){ const file = ctx.request.body.files.file; // 获取上传文件 return ctx.body = file.path; // upload/xxx.xx }) # 上面代码中ctx.request.body是空对象,文件信息还是放在ctx.request.files.file里 router.post('/upload', async (ctx){ const file = ctx.request.files.file; // 获取上传文件 return...
看错了,用 role = 'GUEST', 可以避免的、[捂脸]