diff --git a/web/app/components/app-sidebar/dataset-info/dropdown.tsx b/web/app/components/app-sidebar/dataset-info/dropdown.tsx index 2bc64c8f56..c3d2f599b1 100644 --- a/web/app/components/app-sidebar/dataset-info/dropdown.tsx +++ b/web/app/components/app-sidebar/dataset-info/dropdown.tsx @@ -66,7 +66,7 @@ const DropDown = ({ const a = document.createElement('a') const file = new Blob([data], { type: 'application/yaml' }) a.href = URL.createObjectURL(file) - a.download = `${name}.yml` + a.download = `${name}.pipeline` a.click() } catch { diff --git a/web/app/components/app/create-from-dsl-modal/uploader.tsx b/web/app/components/app/create-from-dsl-modal/uploader.tsx index 3ab54733dc..654c7b5952 100644 --- a/web/app/components/app/create-from-dsl-modal/uploader.tsx +++ b/web/app/components/app/create-from-dsl-modal/uploader.tsx @@ -17,12 +17,16 @@ export type Props = { file: File | undefined updateFile: (file?: File) => void className?: string + accept?: string + displayName?: string } const Uploader: FC = ({ file, updateFile, className, + accept = '.yaml,.yml', + displayName = 'YAML', }) => { const { t } = useTranslation() const { notify } = useContext(ToastContext) @@ -95,9 +99,9 @@ const Uploader: FC = ({
@@ -116,12 +120,12 @@ const Uploader: FC = ({ {file && (
- +
{file.name}
- YAML + {displayName} ยท {formatFileSize(file.size)}
diff --git a/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/uploader.tsx b/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/uploader.tsx index a21d622fac..badc2034d7 100644 --- a/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/uploader.tsx +++ b/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/uploader.tsx @@ -98,7 +98,7 @@ const Uploader: FC = ({ style={{ display: 'none' }} type='file' id='fileUploader' - accept='.yaml,.yml' + accept='.pipeline' onChange={fileChangeHandle} />
diff --git a/web/app/components/datasets/create-from-pipeline/list/template-card/index.tsx b/web/app/components/datasets/create-from-pipeline/list/template-card/index.tsx index 30bf3e2137..ef5f38a72b 100644 --- a/web/app/components/datasets/create-from-pipeline/list/template-card/index.tsx +++ b/web/app/components/datasets/create-from-pipeline/list/template-card/index.tsx @@ -103,7 +103,7 @@ const TemplateCard = ({ const blob = new Blob([res.data], { type: 'application/yaml' }) downloadFile({ data: blob, - fileName: `${pipeline.name}.yml`, + fileName: `${pipeline.name}.pipeline`, }) Toast.notify({ type: 'success', diff --git a/web/app/components/datasets/list/dataset-card/index.tsx b/web/app/components/datasets/list/dataset-card/index.tsx index fe161ee459..253d397d95 100644 --- a/web/app/components/datasets/list/dataset-card/index.tsx +++ b/web/app/components/datasets/list/dataset-card/index.tsx @@ -115,7 +115,7 @@ const DatasetCard = ({ const a = document.createElement('a') const file = new Blob([data], { type: 'application/yaml' }) a.href = URL.createObjectURL(file) - a.download = `${name}.yml` + a.download = `${name}.pipeline` a.click() } catch { diff --git a/web/app/components/rag-pipeline/components/update-dsl-modal.tsx b/web/app/components/rag-pipeline/components/update-dsl-modal.tsx index 090fe1c42f..6afa367fff 100644 --- a/web/app/components/rag-pipeline/components/update-dsl-modal.tsx +++ b/web/app/components/rag-pipeline/components/update-dsl-modal.tsx @@ -233,6 +233,8 @@ const UpdateDSLModal = ({ file={currentFile} updateFile={handleFile} className='!mt-0 w-full' + accept='.pipeline' + displayName='PIPELINE' />
diff --git a/web/app/components/rag-pipeline/hooks/use-DSL.ts b/web/app/components/rag-pipeline/hooks/use-DSL.ts index 36ac6b9e0b..f0c6782c5e 100644 --- a/web/app/components/rag-pipeline/hooks/use-DSL.ts +++ b/web/app/components/rag-pipeline/hooks/use-DSL.ts @@ -40,7 +40,7 @@ export const useDSL = () => { const a = document.createElement('a') const file = new Blob([data], { type: 'application/yaml' }) a.href = URL.createObjectURL(file) - a.download = `${knowledgeName}.yml` + a.download = `${knowledgeName}.pipeline` a.click() } catch {