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 ab4e2aaa42..02bb3ad673 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
@@ -26,9 +26,11 @@ type Option = {
icon: React.JSX.Element
}
type FileUploaderInAttachmentProps = {
+ isDisabled?: boolean
fileConfig: FileUpload
}
const FileUploaderInAttachment = ({
+ isDisabled,
fileConfig,
}: FileUploaderInAttachmentProps) => {
const { t } = useTranslation()
@@ -89,16 +91,18 @@ const FileUploaderInAttachment = ({
return (
-
- {options.map(renderOption)}
-
+ {!isDisabled && (
+
+ {options.map(renderOption)}
+
+ )}
{
files.map(file => (
handleRemoveFile(file.id)}
onReUpload={() => handleReUploadFile(file.id)}
@@ -114,18 +118,20 @@ type FileUploaderInAttachmentWrapperProps = {
value?: FileEntity[]
onChange: (files: FileEntity[]) => void
fileConfig: FileUpload
+ isDisabled?: boolean
}
const FileUploaderInAttachmentWrapper = ({
value,
onChange,
fileConfig,
+ isDisabled,
}: FileUploaderInAttachmentWrapperProps) => {
return (
-
+
)
}
diff --git a/web/app/components/workflow/variable-inspect/value-content.tsx b/web/app/components/workflow/variable-inspect/value-content.tsx
index a70c318c35..3987d348c4 100644
--- a/web/app/components/workflow/variable-inspect/value-content.tsx
+++ b/web/app/components/workflow/variable-inspect/value-content.tsx
@@ -207,6 +207,7 @@ const ValueContent = ({
number_limits: currentVar.value_type === 'file' ? 1 : (fileFeature as any).fileUploadConfig?.workflow_file_upload_limit || 5,
fileUploadConfig: (fileFeature as any).fileUploadConfig,
}}
+ isDisabled={textEditorDisabled}
/>
)}