@nocobase/plugin-file-manager 0.11.1-alpha.3 → 0.11.1-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.createMiddleware = createMiddleware;
|
|
7
7
|
exports.destroyMiddleware = destroyMiddleware;
|
|
8
|
-
function
|
|
9
|
-
const data =
|
|
10
|
-
|
|
8
|
+
function _utils() {
|
|
9
|
+
const data = require("@nocobase/utils");
|
|
10
|
+
_utils = function _utils() {
|
|
11
11
|
return data;
|
|
12
12
|
};
|
|
13
13
|
return data;
|
|
@@ -99,7 +99,7 @@ function _multipart() {
|
|
|
99
99
|
},
|
|
100
100
|
storage: storageConfig.make(storage)
|
|
101
101
|
};
|
|
102
|
-
const upload = (0,
|
|
102
|
+
const upload = (0, _utils().koaMulter)(multerOptions).single(_constants.FILE_FIELD_NAME);
|
|
103
103
|
try {
|
|
104
104
|
// NOTE: empty next and invoke after success
|
|
105
105
|
yield upload(ctx, () => {});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-file-manager",
|
|
3
|
-
"version": "0.11.1-alpha.
|
|
3
|
+
"version": "0.11.1-alpha.4",
|
|
4
4
|
"displayName": "file manager",
|
|
5
5
|
"displayName.zh-CN": "文件管理",
|
|
6
6
|
"description": "file management plugin.",
|
|
@@ -37,16 +37,16 @@
|
|
|
37
37
|
"@formily/core": "2.2.26",
|
|
38
38
|
"@formily/react": "2.2.26",
|
|
39
39
|
"@formily/shared": "2.2.26",
|
|
40
|
-
"@nocobase/actions": "0.11.1-alpha.
|
|
41
|
-
"@nocobase/client": "0.11.1-alpha.
|
|
42
|
-
"@nocobase/database": "0.11.1-alpha.
|
|
43
|
-
"@nocobase/server": "0.11.1-alpha.
|
|
44
|
-
"@nocobase/test": "0.11.1-alpha.
|
|
45
|
-
"@nocobase/utils": "0.11.1-alpha.
|
|
40
|
+
"@nocobase/actions": "0.11.1-alpha.4",
|
|
41
|
+
"@nocobase/client": "0.11.1-alpha.4",
|
|
42
|
+
"@nocobase/database": "0.11.1-alpha.4",
|
|
43
|
+
"@nocobase/server": "0.11.1-alpha.4",
|
|
44
|
+
"@nocobase/test": "0.11.1-alpha.4",
|
|
45
|
+
"@nocobase/utils": "0.11.1-alpha.4",
|
|
46
46
|
"antd": "^5.6.4",
|
|
47
47
|
"react": "^18.2.0",
|
|
48
48
|
"react-i18next": "^11.15.1",
|
|
49
49
|
"supertest": "^6.1.6"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "d9b5bde913013f1057e1aab49587eb0ad3dcb06e"
|
|
52
52
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { Context, Next } from '@nocobase/actions';
|
|
2
|
+
import { koaMulter as multer } from '@nocobase/utils';
|
|
3
3
|
import path from 'path';
|
|
4
4
|
|
|
5
5
|
import { DEFAULT_MAX_FILE_SIZE, FILE_FIELD_NAME, LIMIT_FILES } from '../constants';
|