@nocobase/plugin-file-manager 2.2.0-beta.14 → 2.2.0-beta.16
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/dist/client/UseOriginalUrlRadio.d.ts +12 -0
- package/dist/client/index.js +1 -1
- package/dist/client/schemas/storageTypes/ali-oss.d.ts +12 -0
- package/dist/client/schemas/storageTypes/common.d.ts +12 -0
- package/dist/client/schemas/storageTypes/index.d.ts +48 -0
- package/dist/client/schemas/storageTypes/local.d.ts +12 -0
- package/dist/client/schemas/storageTypes/s3.d.ts +12 -0
- package/dist/client/schemas/storageTypes/tx-cos.d.ts +12 -0
- package/dist/client-v2/{229.bd72c2d7aa088310.js → 229.297c431f63a29cb2.js} +1 -1
- package/dist/client-v2/{336.1dd1b32466d0c778.js → 336.04d06f2cdcc3d0b5.js} +1 -1
- package/dist/client-v2/{43.eb45d53ba3e9828b.js → 43.1ec3e5bf1118d239.js} +1 -1
- package/dist/client-v2/{929.d7e783304cc1f236.js → 929.3744119eff70b3a3.js} +1 -1
- package/dist/client-v2/components/PublicAccessField.d.ts +19 -0
- package/dist/client-v2/components/UseOriginalUrlField.d.ts +25 -0
- package/dist/client-v2/components/index.d.ts +2 -0
- package/dist/client-v2/index.d.ts +2 -1
- package/dist/client-v2/index.js +1 -1
- package/dist/externalVersion.js +12 -12
- package/dist/locale/de-DE.json +7 -0
- package/dist/locale/en-US.json +7 -0
- package/dist/locale/es-ES.json +7 -0
- package/dist/locale/fr-FR.json +7 -0
- package/dist/locale/hu-HU.json +7 -0
- package/dist/locale/id-ID.json +7 -0
- package/dist/locale/it-IT.json +7 -0
- package/dist/locale/ja-JP.json +7 -0
- package/dist/locale/ko-KR.json +7 -0
- package/dist/locale/nl-NL.json +7 -0
- package/dist/locale/pt-BR.json +7 -0
- package/dist/locale/ru-RU.json +7 -0
- package/dist/locale/tr-TR.json +7 -0
- package/dist/locale/uk-UA.json +7 -0
- package/dist/locale/vi-VN.json +7 -0
- package/dist/locale/zh-CN.json +7 -0
- package/dist/locale/zh-TW.json +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/package.json +1 -1
- package/dist/node_modules/@aws-sdk/lib-storage/package.json +1 -1
- package/dist/node_modules/@aws-sdk/s3-request-presigner/package.json +1 -1
- package/dist/node_modules/ali-oss/package.json +1 -1
- package/dist/node_modules/cos-nodejs-sdk-v5/package.json +1 -1
- package/dist/node_modules/mime-match/package.json +1 -1
- package/dist/node_modules/mime-types/package.json +1 -1
- package/dist/node_modules/mkdirp/package.json +1 -1
- package/dist/node_modules/url-join/package.json +1 -1
- package/dist/server/actions/attachments.js +9 -1
- package/dist/server/actions/get-file.js +20 -11
- package/dist/server/server.js +8 -7
- package/package.json +2 -2
|
@@ -100,6 +100,18 @@ declare const _default: {
|
|
|
100
100
|
}[];
|
|
101
101
|
default: string;
|
|
102
102
|
};
|
|
103
|
+
'options.useOriginalUrl': {
|
|
104
|
+
type: string;
|
|
105
|
+
title: string;
|
|
106
|
+
'x-decorator': string;
|
|
107
|
+
'x-component': string;
|
|
108
|
+
default: boolean;
|
|
109
|
+
};
|
|
110
|
+
'options.public': {
|
|
111
|
+
type: string;
|
|
112
|
+
'x-display': string;
|
|
113
|
+
default: boolean;
|
|
114
|
+
};
|
|
103
115
|
rules: {
|
|
104
116
|
type: string;
|
|
105
117
|
'x-component': string;
|
|
@@ -65,6 +65,18 @@ declare const _default: {
|
|
|
65
65
|
'x-content': string;
|
|
66
66
|
description: string;
|
|
67
67
|
};
|
|
68
|
+
useOriginalUrl: {
|
|
69
|
+
type: string;
|
|
70
|
+
title: string;
|
|
71
|
+
'x-decorator': string;
|
|
72
|
+
'x-component': string;
|
|
73
|
+
default: boolean;
|
|
74
|
+
};
|
|
75
|
+
public: {
|
|
76
|
+
type: string;
|
|
77
|
+
'x-display': string;
|
|
78
|
+
default: boolean;
|
|
79
|
+
};
|
|
68
80
|
renameMode: {
|
|
69
81
|
title: string;
|
|
70
82
|
description: string;
|
|
@@ -62,6 +62,18 @@ export declare const storageTypes: {
|
|
|
62
62
|
}[];
|
|
63
63
|
default: string;
|
|
64
64
|
};
|
|
65
|
+
'options.useOriginalUrl': {
|
|
66
|
+
type: string;
|
|
67
|
+
title: string;
|
|
68
|
+
'x-decorator': string;
|
|
69
|
+
'x-component': string;
|
|
70
|
+
default: boolean;
|
|
71
|
+
};
|
|
72
|
+
'options.public': {
|
|
73
|
+
type: string;
|
|
74
|
+
'x-display': string;
|
|
75
|
+
default: boolean;
|
|
76
|
+
};
|
|
65
77
|
rules: {
|
|
66
78
|
type: string;
|
|
67
79
|
'x-component': string;
|
|
@@ -194,6 +206,18 @@ export declare const storageTypes: {
|
|
|
194
206
|
}[];
|
|
195
207
|
default: string;
|
|
196
208
|
};
|
|
209
|
+
'options.useOriginalUrl': {
|
|
210
|
+
type: string;
|
|
211
|
+
title: string;
|
|
212
|
+
'x-decorator': string;
|
|
213
|
+
'x-component': string;
|
|
214
|
+
default: boolean;
|
|
215
|
+
};
|
|
216
|
+
'options.public': {
|
|
217
|
+
type: string;
|
|
218
|
+
'x-display': string;
|
|
219
|
+
default: boolean;
|
|
220
|
+
};
|
|
197
221
|
rules: {
|
|
198
222
|
type: string;
|
|
199
223
|
'x-component': string;
|
|
@@ -333,6 +357,18 @@ export declare const storageTypes: {
|
|
|
333
357
|
}[];
|
|
334
358
|
default: string;
|
|
335
359
|
};
|
|
360
|
+
'options.useOriginalUrl': {
|
|
361
|
+
type: string;
|
|
362
|
+
title: string;
|
|
363
|
+
'x-decorator': string;
|
|
364
|
+
'x-component': string;
|
|
365
|
+
default: boolean;
|
|
366
|
+
};
|
|
367
|
+
'options.public': {
|
|
368
|
+
type: string;
|
|
369
|
+
'x-display': string;
|
|
370
|
+
default: boolean;
|
|
371
|
+
};
|
|
336
372
|
rules: {
|
|
337
373
|
type: string;
|
|
338
374
|
'x-component': string;
|
|
@@ -456,6 +492,18 @@ export declare const storageTypes: {
|
|
|
456
492
|
}[];
|
|
457
493
|
default: string;
|
|
458
494
|
};
|
|
495
|
+
'options.useOriginalUrl': {
|
|
496
|
+
type: string;
|
|
497
|
+
title: string;
|
|
498
|
+
'x-decorator': string;
|
|
499
|
+
'x-component': string;
|
|
500
|
+
default: boolean;
|
|
501
|
+
};
|
|
502
|
+
'options.public': {
|
|
503
|
+
type: string;
|
|
504
|
+
'x-display': string;
|
|
505
|
+
default: boolean;
|
|
506
|
+
};
|
|
459
507
|
rules: {
|
|
460
508
|
type: string;
|
|
461
509
|
'x-component': string;
|
|
@@ -61,6 +61,18 @@ declare const _default: {
|
|
|
61
61
|
}[];
|
|
62
62
|
default: string;
|
|
63
63
|
};
|
|
64
|
+
'options.useOriginalUrl': {
|
|
65
|
+
type: string;
|
|
66
|
+
title: string;
|
|
67
|
+
'x-decorator': string;
|
|
68
|
+
'x-component': string;
|
|
69
|
+
default: boolean;
|
|
70
|
+
};
|
|
71
|
+
'options.public': {
|
|
72
|
+
type: string;
|
|
73
|
+
'x-display': string;
|
|
74
|
+
default: boolean;
|
|
75
|
+
};
|
|
64
76
|
rules: {
|
|
65
77
|
type: string;
|
|
66
78
|
'x-component': string;
|
|
@@ -87,6 +87,18 @@ declare const _default: {
|
|
|
87
87
|
}[];
|
|
88
88
|
default: string;
|
|
89
89
|
};
|
|
90
|
+
'options.useOriginalUrl': {
|
|
91
|
+
type: string;
|
|
92
|
+
title: string;
|
|
93
|
+
'x-decorator': string;
|
|
94
|
+
'x-component': string;
|
|
95
|
+
default: boolean;
|
|
96
|
+
};
|
|
97
|
+
'options.public': {
|
|
98
|
+
type: string;
|
|
99
|
+
'x-display': string;
|
|
100
|
+
default: boolean;
|
|
101
|
+
};
|
|
90
102
|
rules: {
|
|
91
103
|
type: string;
|
|
92
104
|
'x-component': string;
|
|
@@ -91,6 +91,18 @@ declare const _default: {
|
|
|
91
91
|
}[];
|
|
92
92
|
default: string;
|
|
93
93
|
};
|
|
94
|
+
'options.useOriginalUrl': {
|
|
95
|
+
type: string;
|
|
96
|
+
title: string;
|
|
97
|
+
'x-decorator': string;
|
|
98
|
+
'x-component': string;
|
|
99
|
+
default: boolean;
|
|
100
|
+
};
|
|
101
|
+
'options.public': {
|
|
102
|
+
type: string;
|
|
103
|
+
'x-display': string;
|
|
104
|
+
default: boolean;
|
|
105
|
+
};
|
|
94
106
|
rules: {
|
|
95
107
|
type: string;
|
|
96
108
|
'x-component': string;
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
"use strict";(self.webpackChunk_nocobase_plugin_file_manager_client_v2=self.webpackChunk_nocobase_plugin_file_manager_client_v2||[]).push([["229"],{316:function(e,l,n){n.r(l),n.d(l,{default:function(){return o}});var t=n(485),a=n(59),r=n(155),c=n.n(r),m=n(
|
|
10
|
+
"use strict";(self.webpackChunk_nocobase_plugin_file_manager_client_v2=self.webpackChunk_nocobase_plugin_file_manager_client_v2||[]).push([["229"],{316:function(e,l,n){n.r(l),n.d(l,{default:function(){return o}});var t=n(485),a=n(59),r=n(155),c=n.n(r),m=n(592),u=n(488);function o(){var e=(0,u.k)(),l=[{required:!0,message:e("The field value is required")}];return c().createElement(c().Fragment,null,c().createElement(m.Lg,null),c().createElement(m.om,null),c().createElement(m.BL,null),c().createElement(a.Form.Item,{name:["options","Region"],label:"".concat(e("Region")," :"),rules:l},c().createElement(t.EnvVariableInput,null)),c().createElement(a.Form.Item,{name:["options","SecretId"],label:"".concat(e("SecretId")," :"),rules:l},c().createElement(t.EnvVariableInput,null)),c().createElement(a.Form.Item,{name:["options","SecretKey"],label:"".concat(e("SecretKey")," :"),rules:l},c().createElement(t.EnvVariableInput,{password:!0})),c().createElement(a.Form.Item,{name:["options","Bucket"],label:"".concat(e("Bucket")," :"),rules:l},c().createElement(t.EnvVariableInput,null)),c().createElement(a.Form.Item,{name:["options","thumbnailRule"],label:"".concat(e("Thumbnail rule")," :")},c().createElement(t.EnvVariableInput,{placeholder:"?imageMogr2/thumbnail/!50p"})),c().createElement(m.Sx,null),c().createElement(m.OC,null),c().createElement(m.C6,null),c().createElement(m.KT,null),c().createElement(m.Lq,null),c().createElement(m.mt,null),c().createElement(m.tp,null))}}}]);
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
"use strict";(self.webpackChunk_nocobase_plugin_file_manager_client_v2=self.webpackChunk_nocobase_plugin_file_manager_client_v2||[]).push([["336"],{595:function(e,n,
|
|
10
|
+
"use strict";(self.webpackChunk_nocobase_plugin_file_manager_client_v2=self.webpackChunk_nocobase_plugin_file_manager_client_v2||[]).push([["336"],{595:function(e,n,l){l.r(n),l.d(n,{default:function(){return o}});var t=l(485),a=l(59),r=l(155),c=l.n(r),m=l(592),u=l(488);function o(){var e=(0,u.k)(),n=[{required:!0,message:e("The field value is required")}];return c().createElement(c().Fragment,null,c().createElement(m.Lg,null),c().createElement(m.om,null),c().createElement(m.BL,null),c().createElement(a.Form.Item,{name:["options","region"],label:"".concat(e("Region")," :"),rules:n},c().createElement(t.EnvVariableInput,null)),c().createElement(a.Form.Item,{name:["options","accessKeyId"],label:"".concat(e("AccessKey ID")," :"),rules:n},c().createElement(t.EnvVariableInput,null)),c().createElement(a.Form.Item,{name:["options","secretAccessKey"],label:"".concat(e("AccessKey Secret")," :"),rules:n},c().createElement(t.EnvVariableInput,{password:!0})),c().createElement(a.Form.Item,{name:["options","bucket"],label:"".concat(e("Bucket")," :"),rules:n},c().createElement(t.EnvVariableInput,null)),c().createElement(a.Form.Item,{name:["options","endpoint"],label:"".concat(e("Endpoint")," :")},c().createElement(t.EnvVariableInput,null)),c().createElement(m.Sx,null),c().createElement(m.OC,null),c().createElement(m.C6,null),c().createElement(m.KT,null),c().createElement(m.Lq,null),c().createElement(m.mt,null),c().createElement(m.tp,null))}}}]);
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
"use strict";(self.webpackChunk_nocobase_plugin_file_manager_client_v2=self.webpackChunk_nocobase_plugin_file_manager_client_v2||[]).push([["43"],{574:function(e,t,n){n.r(t),n.d(t,{default:function(){return s}});var l=n(485),a=n(59),r=n(155),c=n.n(r),o=n(
|
|
10
|
+
"use strict";(self.webpackChunk_nocobase_plugin_file_manager_client_v2=self.webpackChunk_nocobase_plugin_file_manager_client_v2||[]).push([["43"],{574:function(e,t,n){n.r(t),n.d(t,{default:function(){return s}});var l=n(485),a=n(59),r=n(155),c=n.n(r),o=n(592),m=n(488);function s(){var e=(0,m.k)(),t=[{required:!0,message:e("The field value is required")}];return c().createElement(c().Fragment,null,c().createElement(o.Lg,null),c().createElement(o.om,null),c().createElement(o.BL,null),c().createElement(a.Form.Item,{name:["options","region"],label:"".concat(e("Region")," :"),rules:t,extra:e('Aliyun OSS region part of the bucket. For example: "oss-cn-beijing".')},c().createElement(l.EnvVariableInput,null)),c().createElement(a.Form.Item,{name:["options","accessKeyId"],label:"".concat(e("AccessKey ID")," :"),rules:t},c().createElement(l.EnvVariableInput,null)),c().createElement(a.Form.Item,{name:["options","accessKeySecret"],label:"".concat(e("AccessKey Secret")," :"),rules:t},c().createElement(l.EnvVariableInput,{password:!0})),c().createElement(a.Form.Item,{name:["options","bucket"],label:"".concat(e("Bucket")," :"),rules:t},c().createElement(l.EnvVariableInput,null)),c().createElement(a.Form.Item,{name:["options","timeout"],label:"".concat(e("Timeout")," :"),extra:e("Upload timeout for a single file in milliseconds. Default is 600000.")},c().createElement(a.InputNumber,{style:{width:"100%"}})),c().createElement(a.Form.Item,{name:["options","thumbnailRule"],label:"".concat(e("File pre-process parameters")," :")},c().createElement(l.EnvVariableInput,{placeholder:"?x-oss-process=image/auto-orient,1/resize,m_fill,w_94,h_94/quality,q_90"})),c().createElement(o.Sx,null),c().createElement(o.OC,null),c().createElement(o.C6,null),c().createElement(o.KT,null),c().createElement(o.Lq,null),c().createElement(o.mt,null),c().createElement(o.tp,null),c().createElement(a.Form.Item,{name:["settings","requestOptions"],label:"".concat(e("Request options")," :"),extra:e("Additional options for HTTP requests when fetching files from remote storage on server side, such as headers.")},c().createElement(l.JsonTextArea,{autoSize:{minRows:5}})))}}}]);
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
"use strict";(self.webpackChunk_nocobase_plugin_file_manager_client_v2=self.webpackChunk_nocobase_plugin_file_manager_client_v2||[]).push([["929"],{864:function(e,n,t){t.r(n),t.d(n,{default:function(){return m}});var l=t(59),a=t(155),r=t.n(a),u=t(
|
|
10
|
+
"use strict";(self.webpackChunk_nocobase_plugin_file_manager_client_v2=self.webpackChunk_nocobase_plugin_file_manager_client_v2||[]).push([["929"],{864:function(e,n,t){t.r(n),t.d(n,{default:function(){return m}});var l=t(59),a=t(155),r=t.n(a),u=t(592);function m(){return r().createElement(r().Fragment,null,r().createElement(u.Lg,null),r().createElement(u.om,null),r().createElement(l.Form.Item,{name:"baseUrl",hidden:!0},r().createElement(l.Input,null)),r().createElement(l.Form.Item,{name:["options","documentRoot"],hidden:!0},r().createElement(l.Input,null)),r().createElement(u.Sx,{addonBefore:"storage/uploads/"}),r().createElement(u.OC,null),r().createElement(u.C6,null),r().createElement(u.KT,null),r().createElement(u.Lq,null),r().createElement(u.mt,null),r().createElement(u.tp,null))}}}]);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
type Translate = (key: string) => string;
|
|
11
|
+
export interface PublicAccessCheckboxProps {
|
|
12
|
+
checked?: boolean;
|
|
13
|
+
onChange?: (checked: boolean) => void;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
t: Translate;
|
|
16
|
+
}
|
|
17
|
+
export declare function PublicAccessCheckbox({ checked, onChange, disabled, t }: PublicAccessCheckboxProps): React.JSX.Element;
|
|
18
|
+
export declare function PublicAccessField(): React.JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
type Translate = (key: string) => string;
|
|
11
|
+
export interface UseOriginalUrlRadioProps {
|
|
12
|
+
id?: string;
|
|
13
|
+
value?: boolean;
|
|
14
|
+
onChange?: (value: boolean) => void;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
originalUrlExample?: string;
|
|
17
|
+
publicAccessControl?: React.ReactNode;
|
|
18
|
+
t: Translate;
|
|
19
|
+
}
|
|
20
|
+
export interface UseOriginalUrlFieldProps {
|
|
21
|
+
originalUrlExample?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare function UseOriginalUrlRadio({ id, value, onChange, disabled, originalUrlExample, publicAccessControl, t, }: UseOriginalUrlRadioProps): React.JSX.Element;
|
|
24
|
+
export declare function UseOriginalUrlField(props: UseOriginalUrlFieldProps): React.JSX.Element;
|
|
25
|
+
export {};
|
|
@@ -13,5 +13,7 @@ export * from './MimetypeField';
|
|
|
13
13
|
export * from './NameField';
|
|
14
14
|
export * from './ParanoidField';
|
|
15
15
|
export * from './PathField';
|
|
16
|
+
export * from './PublicAccessField';
|
|
16
17
|
export * from './RenameModeField';
|
|
17
18
|
export * from './TitleField';
|
|
19
|
+
export * from './UseOriginalUrlField';
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
export { default } from './plugin';
|
|
10
10
|
export { default as PluginFileManagerClientV2 } from './plugin';
|
|
11
11
|
export type { StorageType } from './plugin';
|
|
12
|
-
export { BaseUrlField, DefaultField, FileSizeField, MimetypeField, NameField, ParanoidField, PathField, RenameModeField, TitleField, } from './components';
|
|
12
|
+
export { BaseUrlField, DefaultField, FileSizeField, MimetypeField, NameField, ParanoidField, PathField, PublicAccessField, RenameModeField, TitleField, UseOriginalUrlField, UseOriginalUrlRadio, } from './components';
|
|
13
|
+
export type { UseOriginalUrlFieldProps, UseOriginalUrlRadioProps } from './components/UseOriginalUrlField';
|
|
13
14
|
export type { DefaultFieldProps } from './components/DefaultField';
|
|
14
15
|
export type { PathFieldProps } from './components/PathField';
|
|
15
16
|
export { CardUpload, UploadFieldModel } from './models/UploadFieldModel';
|