From 49b7acf52eb31e5e647174aefaf916287112d4be Mon Sep 17 00:00:00 2001 From: StyleZhang Date: Thu, 19 Sep 2024 14:52:22 +0800 Subject: [PATCH] fix: file uploader --- .../file-uploader-in-attachment/index.tsx | 13 +++++++------ .../file-uploader-in-chat-input/index.tsx | 3 +++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/web/app/components/base/file-uploader/file-uploader-in-attachment/index.tsx b/web/app/components/base/file-uploader/file-uploader-in-attachment/index.tsx index 54182413f1..facc037b03 100644 --- a/web/app/components/base/file-uploader/file-uploader-in-attachment/index.tsx +++ b/web/app/components/base/file-uploader/file-uploader-in-attachment/index.tsx @@ -18,6 +18,7 @@ import FileItem from './file-item' import Button from '@/app/components/base/button' import cn from '@/utils/classnames' import type { FileUpload } from '@/app/components/base/features/types' +import { TransferMethod } from '@/types/app' type Option = { value: string @@ -38,12 +39,12 @@ const FileUploaderInAttachment = ({ } = useFile(fileConfig) const options = [ { - value: 'local', + value: TransferMethod.local_file, label: t('common.fileUploader.uploadFromComputer'), icon: , }, { - value: 'link', + value: TransferMethod.remote_url, label: t('common.fileUploader.pasteFileLink'), icon: , }, @@ -54,13 +55,13 @@ const FileUploaderInAttachment = ({