diff --git a/frontend/src/lib/components/common/fileDownload/FileDownload.svelte b/frontend/src/lib/components/common/fileDownload/FileDownload.svelte index 8887e6b4e0..0062c171aa 100644 --- a/frontend/src/lib/components/common/fileDownload/FileDownload.svelte +++ b/frontend/src/lib/components/common/fileDownload/FileDownload.svelte @@ -12,20 +12,22 @@ let { s3object, workspaceId = undefined, appPath = undefined }: Props = $props() - - - - {s3object.storage ? `s3://${s3object.storage}/${s3object.s3}` : `s3:///${s3object.s3}`} - - + href={`${base}/api/w/${workspaceId ?? $workspaceStore}${ + appPath ? `/apps_u/download_s3_file/${appPath}` : '/job_helpers/download_s3_file' + }?${appPath ? 's3' : 'file_key'}=${encodeURIComponent(s3object?.s3 ?? '')}${ + s3object?.storage ? `&storage=${s3object.storage}` : '' + }${appPath && s3object?.presigned ? `&${s3object?.presigned}` : ''}`} + download={s3object?.s3?.split?.('/')?.pop() ?? 'unnamed_download.file'} + > + + + {s3object?.storage ? `s3://${s3object.storage}/${s3object.s3}` : `s3:///${s3object.s3}`} + + +{/if}