diff --git a/packages/core/client/src/file-manager/StorageOptions.tsx b/packages/core/client/src/file-manager/StorageOptions.tsx index e84e8e49e..c42776caa 100644 --- a/packages/core/client/src/file-manager/StorageOptions.tsx +++ b/packages/core/client/src/file-manager/StorageOptions.tsx @@ -11,6 +11,14 @@ const schema = { type: 'string', 'x-decorator': 'FormItem', 'x-component': 'Input', + default: 'uploads', + }, + serve: { + type: 'string', + 'x-decorator': 'FormItem', + 'x-component': 'Checkbox', + 'x-content': '{{t("Use the built-in static file server")}}', + default: true, }, }, }, @@ -34,7 +42,7 @@ const schema = { title: '{{t("AccessKey Secret")}}', type: 'string', 'x-decorator': 'FormItem', - 'x-component': 'Input', + 'x-component': 'Password', required: true, }, bucket: { @@ -66,7 +74,7 @@ const schema = { title: '{{t("AccessKey Secret")}}', type: 'string', 'x-decorator': 'FormItem', - 'x-component': 'Input', + 'x-component': 'Password', required: true, }, bucket: { diff --git a/packages/core/client/src/file-manager/schemas/storage.ts b/packages/core/client/src/file-manager/schemas/storage.ts index f7fe776b2..feba4e7ed 100644 --- a/packages/core/client/src/file-manager/schemas/storage.ts +++ b/packages/core/client/src/file-manager/schemas/storage.ts @@ -160,7 +160,6 @@ export const storageSchema: ISchema = { options: { type: 'object', 'x-component': 'StorageOptions', - 'x-decorator': 'FormItem', }, default: { 'x-component': 'CollectionField', @@ -293,7 +292,6 @@ export const storageSchema: ISchema = { options: { type: 'object', 'x-component': 'StorageOptions', - 'x-decorator': 'FormItem', }, default: { title: '', diff --git a/packages/core/client/src/locale/zh_CN.ts b/packages/core/client/src/locale/zh_CN.ts index 9aaa7d482..52118a40f 100644 --- a/packages/core/client/src/locale/zh_CN.ts +++ b/packages/core/client/src/locale/zh_CN.ts @@ -390,4 +390,9 @@ export default { 'Add storage': '添加文件存储', 'Edit storage': '编辑文件存储', 'Storage base URL': 'Base URL', + 'Destination': '文件路径', + 'Use the built-in static file server': '使用内置静态文件服务', + 'Local storage': '本地存储', + 'Aliyun OSS': '阿里云 OSS', + 'Amazon S3': '亚马逊 S3', } diff --git a/packages/core/server/src/application.ts b/packages/core/server/src/application.ts index 87bda7dd5..2bd7c4536 100644 --- a/packages/core/server/src/application.ts +++ b/packages/core/server/src/application.ts @@ -9,11 +9,11 @@ import { i18n, InitOptions } from 'i18next'; import Koa from 'koa'; import { isBoolean } from 'lodash'; import { createACL } from './acl'; +import { AppManager } from './app-manager'; import { createCli } from './commands'; import { createDatabase, createI18n, createResourcer, registerMiddlewares } from './helper'; import { Plugin } from './plugin'; -import { PluginManager, InstallOptions } from './plugin-manager'; -import { AppManager } from './app-manager'; +import { InstallOptions, PluginManager } from './plugin-manager'; export type PluginConfiguration = string | [string, any]; export type PluginsConfigurations = Array;