Skip to content

Commit 9b77d42

Browse files
author
pedro
committed
fix:修复文件上传的环境bug
1 parent ce03bc7 commit 9b77d42

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

app/config/setting.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ module.exports = {
99
accessExp: 60 * 60, // 1h 单位秒
1010
// debug 模式
1111
debug: true,
12-
// refreshExp 设置refresh_token的过期时间
12+
// refreshExp 设置refresh_token的过期时间,默认一个月
13+
refreshExp: 60 * 60 * 24 * 30,
1314
// 暂不启用插件
1415
pluginPath: {
1516
// plugin name

app/extensions/file/local-uploader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class LocalUploader extends Uploader {
4444
// type: 1,
4545
name: realName,
4646
extension: ext,
47-
size: stream.readableLength,
47+
size: stream._readableState.length,
4848
md5: md5
4949
},
5050
true

0 commit comments

Comments
 (0)