99 lines
3.0 KiB
HTML
99 lines
3.0 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>{{.ID}} | minibin</title>
|
|
<link rel="stylesheet" href="/css/main.css" />
|
|
</head>
|
|
<script src="/js/copy.js" defer></script>
|
|
<body>
|
|
{{template "site-header"}}
|
|
<main>
|
|
<div>
|
|
{{if hasPrefix .MIMEType "image/"}}
|
|
<img src="/{{.ID}}{{.FileExtension}}" />
|
|
{{else if hasPrefix .MIMEType "video/"}}
|
|
<video src="/{{.ID}}{{.FileExtension}}" controls></video>
|
|
{{else if hasPrefix .MIMEType "audio/"}}
|
|
<audio src="/{{.ID}}{{.FileExtension}}" controls></audio>
|
|
{{else}}
|
|
<h2>{{.Filename}}</h2>
|
|
<h2>{{.ID}}{{.FileExtension}}</h2>
|
|
{{end}}
|
|
</div>
|
|
|
|
<details>
|
|
<summary>upload metadata</summary>
|
|
<table class="upload-metadata">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">key</th>
|
|
<th scope="col">value</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<th scope="row">id</th>
|
|
<td>{{.ID}}</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">type</th>
|
|
<td>{{.Type}}</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">filename</th>
|
|
<td>{{.Filename}}</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">mimetype</th>
|
|
<td>{{.MIMEType}}</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">size</th>
|
|
<td>{{.Size}}</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">sha256</th>
|
|
<td>{{.SHA256}}</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">created at</th>
|
|
<td>{{.CreatedAt}}</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">expires at</th>
|
|
<td>{{if .ExpiresAt}}{{.ExpiresAt}}{{else}}indefinite{{end}}</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">last accessed at</th>
|
|
<td>{{.LastAccessedAt}}</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">file extension</th>
|
|
<td>{{.FileExtension}}</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">delete token</th>
|
|
<td>{{.DeleteToken}}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</details>
|
|
|
|
<div class="upload-links">
|
|
<a href="/{{.ID}}{{.FileExtension}}">view raw upload</a>
|
|
<!--
|
|
copying is only available with javascript
|
|
we will make this element visible with javascript
|
|
-->
|
|
<a id="copy-link" data-id="{{.ID}}" data-extension="{{.FileExtension}}" href="#" style="display: none">copy link</a>
|
|
<form action="/{{.ID}}/delete?redirect=true" method="post">
|
|
<input type="hidden" name="delete_token" value="{{.DeleteToken}}" />
|
|
<button type="submit" class="link-btn">delete upload</button>
|
|
</form>
|
|
</div>
|
|
</main>
|
|
</body>
|
|
</html>
|