From 46976314776c6529e0c5f17a5e7e85c64b6e313e Mon Sep 17 00:00:00 2001 From: trueai-org Date: Sun, 18 Aug 2024 21:33:41 +0800 Subject: [PATCH] fix: webp --- src/pages/Draw/index.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/pages/Draw/index.tsx b/src/pages/Draw/index.tsx index fc8b0bf..286eb5f 100644 --- a/src/pages/Draw/index.tsx +++ b/src/pages/Draw/index.tsx @@ -694,8 +694,6 @@ const Draw: React.FC = () => { }); }; - - const getTaskMarkdownInfo = (task: any) => { if (!task.properties['finalPrompt']) { return <>; @@ -815,7 +813,7 @@ const Draw: React.FC = () => { ); } }; - + const actionArea = () => { if (botType === 'INSIGHT_FACE' || botType === 'FACE_SWAP') { return ( @@ -1050,7 +1048,10 @@ const Draw: React.FC = () => { const beforeUpload = (file: RcFile) => { const isJpgOrPng = - file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'video/mp4'; + file.type === 'image/jpeg' || + file.type === 'image/png' || + file.type === 'video/mp4' || + file.type === 'image/webp'; if (!isJpgOrPng) { message.error(intl.formatMessage({ id: 'pages.draw.onlyJpgPng' })); }