@nocobase/plugin-file-manager 0.11.0-alpha.1 → 0.11.1-alpha.2
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.
- package/lib/client/StorageOptions.js +6 -0
- package/lib/client/hooks/useUploadFiles.js +1 -1
- package/lib/server/collections/storages.js +2 -1
- package/package.json +8 -8
- package/src/client/StorageOptions.tsx +6 -0
- package/src/client/hooks/useUploadFiles.ts +1 -1
- package/src/server/collections/storages.ts +1 -0
|
@@ -146,6 +146,12 @@ const schema = {
|
|
|
146
146
|
'x-decorator': 'FormItem',
|
|
147
147
|
'x-component': 'Input',
|
|
148
148
|
required: true
|
|
149
|
+
},
|
|
150
|
+
endpoint: {
|
|
151
|
+
title: `{{t("Endpoint", { ns: "${_locale.NAMESPACE}" })}}`,
|
|
152
|
+
type: 'string',
|
|
153
|
+
'x-decorator': 'FormItem',
|
|
154
|
+
'x-component': 'Input'
|
|
149
155
|
}
|
|
150
156
|
}
|
|
151
157
|
}
|
|
@@ -27,7 +27,7 @@ function _react() {
|
|
|
27
27
|
}
|
|
28
28
|
var _locale = require("../locale");
|
|
29
29
|
// 限制上传文件大小为 10M
|
|
30
|
-
const FILE_LIMIT_SIZE =
|
|
30
|
+
const FILE_LIMIT_SIZE = 1024 * 1024 * 1024;
|
|
31
31
|
exports.FILE_LIMIT_SIZE = FILE_LIMIT_SIZE;
|
|
32
32
|
const useUploadFiles = () => {
|
|
33
33
|
const _useBlockRequestConte = (0, _client().useBlockRequestContext)(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-file-manager",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.1-alpha.2",
|
|
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.
|
|
41
|
-
"@nocobase/client": "0.11.
|
|
42
|
-
"@nocobase/database": "0.11.
|
|
43
|
-
"@nocobase/server": "0.11.
|
|
44
|
-
"@nocobase/test": "0.11.
|
|
45
|
-
"@nocobase/utils": "0.11.
|
|
40
|
+
"@nocobase/actions": "0.11.1-alpha.2",
|
|
41
|
+
"@nocobase/client": "0.11.1-alpha.2",
|
|
42
|
+
"@nocobase/database": "0.11.1-alpha.2",
|
|
43
|
+
"@nocobase/server": "0.11.1-alpha.2",
|
|
44
|
+
"@nocobase/test": "0.11.1-alpha.2",
|
|
45
|
+
"@nocobase/utils": "0.11.1-alpha.2",
|
|
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": "8482aa720ea1c3abbbb9fe1208e73778bd63f1cf"
|
|
52
52
|
}
|
|
@@ -117,6 +117,12 @@ const schema = {
|
|
|
117
117
|
'x-component': 'Input',
|
|
118
118
|
required: true,
|
|
119
119
|
},
|
|
120
|
+
endpoint: {
|
|
121
|
+
title: `{{t("Endpoint", { ns: "${NAMESPACE}" })}}`,
|
|
122
|
+
type: 'string',
|
|
123
|
+
'x-decorator': 'FormItem',
|
|
124
|
+
'x-component': 'Input',
|
|
125
|
+
},
|
|
120
126
|
},
|
|
121
127
|
},
|
|
122
128
|
};
|
|
@@ -4,7 +4,7 @@ import { useContext } from 'react';
|
|
|
4
4
|
import { useFmTranslation } from '../locale';
|
|
5
5
|
|
|
6
6
|
// 限制上传文件大小为 10M
|
|
7
|
-
export const FILE_LIMIT_SIZE =
|
|
7
|
+
export const FILE_LIMIT_SIZE = 1024 * 1024 * 1024;
|
|
8
8
|
|
|
9
9
|
export const useUploadFiles = () => {
|
|
10
10
|
const { service } = useBlockRequestContext();
|