diff --git a/packages/core/client/src/schema-component/antd/upload/ReadPretty.tsx b/packages/core/client/src/schema-component/antd/upload/ReadPretty.tsx index 5e2d8b181..1ce4e7d79 100644 --- a/packages/core/client/src/schema-component/antd/upload/ReadPretty.tsx +++ b/packages/core/client/src/schema-component/antd/upload/ReadPretty.tsx @@ -95,7 +95,7 @@ ReadPretty.File = function File(props: UploadProps) { > {file.imageUrl && ( {file.title} diff --git a/packages/plugins/@nocobase/plugin-file-manager/src/client/schemas/storageTypes/ali-oss.ts b/packages/plugins/@nocobase/plugin-file-manager/src/client/schemas/storageTypes/ali-oss.ts index c6e7e05b4..b35e299c9 100644 --- a/packages/plugins/@nocobase/plugin-file-manager/src/client/schemas/storageTypes/ali-oss.ts +++ b/packages/plugins/@nocobase/plugin-file-manager/src/client/schemas/storageTypes/ali-oss.ts @@ -56,8 +56,9 @@ export default { 'x-decorator': 'FormItem', 'x-component': 'Input', 'x-component-props': { - placeholder: '?x-oss-process=image/auto-orient,1/resize,m_fill,w_40,h_40/quality,q_90', + placeholder: '?x-oss-process=image/auto-orient,1/resize,m_fill,w_94,h_94/quality,q_90', }, + default: '?x-oss-process=image/auto-orient,1/resize,m_fill,w_94,h_94/quality,q_90', description: '{{ xStyleProcessDesc }}', }, }, diff --git a/packages/plugins/@nocobase/plugin-file-manager/src/server/FileModel.ts b/packages/plugins/@nocobase/plugin-file-manager/src/server/FileModel.ts index 27be26b1f..748a41b32 100644 --- a/packages/plugins/@nocobase/plugin-file-manager/src/server/FileModel.ts +++ b/packages/plugins/@nocobase/plugin-file-manager/src/server/FileModel.ts @@ -7,6 +7,9 @@ export class FileModel extends Model { if (json.storageId && fileStorages && fileStorages.has(json.storageId)) { const storage = fileStorages.get(json.storageId); json['thumbnailRule'] = storage?.options?.thumbnailRule; + if (!json['thumbnailRule'] && storage?.type === 'ali-oss') { + json['thumbnailRule'] = '?x-oss-process=image/auto-orient,1/resize,m_fill,w_94,h_94/quality,q_90'; + } } return json; }