diff options
| author | Jake Mannens <jake@asger.xyz> | 2023-09-26 00:26:07 +1000 |
|---|---|---|
| committer | Jake Mannens <jakem_5@hotmail.com> | 2026-01-14 21:19:38 +1100 |
| commit | ae8a4ba476664801f243bca1fc6cd89d99ae7da8 (patch) | |
| tree | e648bff54c7446089c52c89c0ae3b63b730153ca /Pages | |
| parent | 09b54d55a54322633c940c63758f18712ebc65ae (diff) | |
Added filename source decoding
Diffstat (limited to 'Pages')
| -rw-r--r-- | Pages/ViewMedia.razor | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Pages/ViewMedia.razor b/Pages/ViewMedia.razor index f1270f2..ce9d608 100644 --- a/Pages/ViewMedia.razor +++ b/Pages/ViewMedia.razor @@ -4,6 +4,7 @@ @inject IDbContextFactory<HBContext> dbFactory @inject ITagService tagService @inject IMediaService mediaService +@inject ISourceService sourceService @attribute [Authorize] <PageTitle>@title</PageTitle> @@ -55,6 +56,9 @@ <th>Original Checksum</th> </tr> @foreach(var file in media.UploadedFiles.OrderByDescending(uf => uf.UploadTime)) { + string? sourceUrl = null; + if(file.Filename is not null) + sourceUrl = sourceService.GetUrlFromFilename(file.Filename); <tr> <td title=@file.CreateTime?.ToString()> @(file.CreateTime?.ToString("d") ?? "N/A") @@ -63,7 +67,13 @@ @(file.LastWriteTime?.ToString("d") ?? "N/A") </td> <td title=@file.UploadTime>@(file.UploadTime.ToString("d"))</td> - <td title=@file.Filename>@file.Filename</td> + <td title=@file.Filename> + @if(sourceUrl is not null) { + <a class="nondecorated" target="_blank" href=@sourceUrl>@file.Filename</a> + } else { + @file.Filename + } + </td> <td title=@file.Length>@file.Length.ToBytesSI()</td> <td title=@(file.Checksum + (file.ChecksumVerified ? " (verified)" : "")) |
