1
0
Fork 0
mirror of synced 2024-08-15 10:01:34 +12:00

Use real file names when download files from tables

This commit is contained in:
Andrew Kingston 2022-08-15 11:37:40 +01:00
parent 05bfd86b91
commit 35528ee17e

View file

@ -15,14 +15,24 @@
{#each attachments as attachment}
{#if isImage(attachment.extension)}
<Link quiet target="_blank" href={attachment.url}>
<Link
quiet
target="_blank"
download={attachment.name}
href={attachment.url}
>
<div class="center" title={attachment.name}>
<img src={attachment.url} alt={attachment.extension} />
</div>
</Link>
{:else}
<div class="file" title={attachment.name}>
<Link quiet target="_blank" href={attachment.url}>
<Link
quiet
target="_blank"
download={attachment.name}
href={attachment.url}
>
{attachment.extension}
</Link>
</div>