mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-25 16:02:11 +00:00
fix: fix s3 object download frontend freezes
This commit is contained in:
@@ -12,20 +12,22 @@
|
||||
let { s3object, workspaceId = undefined, appPath = undefined }: Props = $props()
|
||||
</script>
|
||||
|
||||
<a
|
||||
class="relative center-center flex w-full text-center font-normal text-primary text-sm
|
||||
{#if s3object && s3object?.s3}
|
||||
<a
|
||||
class="relative center-center flex w-full text-center font-normal text-primary text-sm
|
||||
border border-dashed border-gray-400 hover:border-blue-500
|
||||
focus-within:border-blue-500 hover:bg-blue-50 dark:hover:bg-frost-900 focus-within:bg-blue-50
|
||||
duration-200 rounded-lg p-1 gap-2"
|
||||
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'}
|
||||
>
|
||||
<Download />
|
||||
<span>
|
||||
{s3object.storage ? `s3://${s3object.storage}/${s3object.s3}` : `s3:///${s3object.s3}`}
|
||||
</span>
|
||||
</a>
|
||||
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'}
|
||||
>
|
||||
<Download />
|
||||
<span>
|
||||
{s3object?.storage ? `s3://${s3object.storage}/${s3object.s3}` : `s3:///${s3object.s3}`}
|
||||
</span>
|
||||
</a>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user