diff --git a/web/app/components/rag-pipeline/hooks/use-DSL.ts b/web/app/components/rag-pipeline/hooks/use-DSL.ts index f0c6782c5e..d4cfebd5b0 100644 --- a/web/app/components/rag-pipeline/hooks/use-DSL.ts +++ b/web/app/components/rag-pipeline/hooks/use-DSL.ts @@ -39,9 +39,11 @@ export const useDSL = () => { }) const a = document.createElement('a') const file = new Blob([data], { type: 'application/yaml' }) - a.href = URL.createObjectURL(file) + const url = URL.createObjectURL(file) + a.href = url a.download = `${knowledgeName}.pipeline` a.click() + URL.revokeObjectURL(url) } catch { notify({ type: 'error', message: t('app.exportFailed') }) diff --git a/web/app/components/workflow-app/hooks/use-DSL.ts b/web/app/components/workflow-app/hooks/use-DSL.ts index 1fedfc8bed..6787c06198 100644 --- a/web/app/components/workflow-app/hooks/use-DSL.ts +++ b/web/app/components/workflow-app/hooks/use-DSL.ts @@ -39,9 +39,11 @@ export const useDSL = () => { }) const a = document.createElement('a') const file = new Blob([data], { type: 'application/yaml' }) - a.href = URL.createObjectURL(file) + const url = URL.createObjectURL(file) + a.href = url a.download = `${appDetail.name}.yml` a.click() + URL.revokeObjectURL(url) } catch { notify({ type: 'error', message: t('app.exportFailed') })