wrap file component in anchor tag for file serving
This commit is contained in:
parent
9fd4ab4e46
commit
7d98b15780
1 changed files with 21 additions and 19 deletions
|
@ -19,6 +19,7 @@ const formatSize = (bytes: number) => {
|
|||
|
||||
export default component$(({ file }: FileProps) => {
|
||||
return (
|
||||
<a href={`/api/${file.ID}`} target="_blank">
|
||||
<div class="rounded-xl bg-neutral-900 flex flex-col overflow-hidden">
|
||||
{ file.Base64 && (file.ID.endsWith(".png") || file.ID.endsWith(".jpg") || file.ID.endsWith(".jpeg")) && (
|
||||
<img
|
||||
|
@ -40,5 +41,6 @@ export default component$(({ file }: FileProps) => {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
)
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue