From efad1e4790ae1d5ad62a860cec79a86dfbfa91c9 Mon Sep 17 00:00:00 2001 From: GQ1994 <957534377@qq.com> Date: Tue, 27 May 2025 14:04:22 +0800 Subject: [PATCH] =?UTF-8?q?Modifying=20the=20preview=20of=20the=20uploaded?= =?UTF-8?q?=20avatar=20will=20freeze,=20fix=20the=20bug=E2=80=A6=20(#20202?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: qingguo --- .../model-provider-page/provider-icon/index.tsx | 3 +-- web/app/routePrefixHandle.tsx | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/web/app/components/header/account-setting/model-provider-page/provider-icon/index.tsx b/web/app/components/header/account-setting/model-provider-page/provider-icon/index.tsx index 9dd4af468d..253269d920 100644 --- a/web/app/components/header/account-setting/model-provider-page/provider-icon/index.tsx +++ b/web/app/components/header/account-setting/model-provider-page/provider-icon/index.tsx @@ -1,6 +1,5 @@ import type { FC } from 'react' import type { ModelProvider } from '../declarations' -import { basePath } from '@/utils/var' import { useLanguage } from '../hooks' import { Openai } from '@/app/components/base/icons/src/vender/other' import { AnthropicDark, AnthropicLight } from '@/app/components/base/icons/src/public/llm' @@ -41,7 +40,7 @@ const ProviderIcon: FC = ({
provider-icon
diff --git a/web/app/routePrefixHandle.tsx b/web/app/routePrefixHandle.tsx index 16ed480000..58b861b014 100644 --- a/web/app/routePrefixHandle.tsx +++ b/web/app/routePrefixHandle.tsx @@ -10,7 +10,7 @@ export default function RoutePrefixHandle() { const addPrefixToImg = (e: HTMLImageElement) => { const url = new URL(e.src) const prefix = url.pathname.substr(0, basePath.length) - if (prefix !== basePath) { + if (prefix !== basePath && !url.href.startsWith('blob:') && !url.href.startsWith('data:')) { url.pathname = basePath + url.pathname e.src = url.toString() }