moved to web, forgot to exclude in gitignore

This commit is contained in:
2026-11-21 18:05:30 -05:00
parent 18b1172f93
commit 67849def05
14 changed files with 881 additions and 2 deletions
+69
View File
@@ -0,0 +1,69 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>faq | minibin</title>
<link rel="stylesheet" href="/css/main.css" />
{{if .Qt}}
<style>
:root {
--qt-url: url("{{.Qt}}");
}
</style>
{{end}}
</head>
<body>
{{template "site-header"}}
<main>
<h2>frequently asked questions</h2>
<h3>how long are uploads/files kept for?</h3>
<p>
minibin will store them for as long as their set expiry, unless they
violate the TOS or have not been accessed in a long time.
</p>
<h3>are uploads modified in any way?</h3>
<p>
no, all uploads are exactly the same as what you uploaded. uploads are
not compressed, transformed, or modified in any way, not even exif data.
</p>
<p>
be wary of any metadata included in the files you are uploading,
especially photos from a phone as they may contain GPS data.
</p>
{{if .NormalizeMIMETypes}}
<h3>why are my html/svg/pdf uploads not being rendered?</h3>
<p>they are being normalized for security.</p>
{{end}}
<h2>api usage</h2>
<h3>how do i upload via the api?</h3>
<p>
send a POST request to <code>/upload</code>. for files, use multipart
form data with a field named <code>file</code>. for pastes, send the
text with <code>Content-Type: text/plain</code>.
</p>
<p>
to add an expiry, append <code>?expiry={value}</code>. <br />supported
values are:
<code
>{{range $i, $expiry := .Expiries}}{{if
$i}},{{end}}{{$expiry.Label}}{{end}}</code
>. omitting an expiry will use the first expiry listed.
</p>
<p>
you can also specify if you would prefer a long or short upload id, just
append <br> <code>?idlength=short</code> to get a shorter id (10 characters),
otherwise it defaults to long (16 character)
</p>
<h4>uploading the output of a command</h4>
<code>cat super-cool-text.txt | curl -T - {{.Host}}/upload</code>
<h4>upload a file via curl</h4>
<code>curl -F "file=@very-cool-image.png" {{.Host}}/upload</code>
<h3>getting upload info</h3>
<p>
you can retrieve an upload's metadata by simply appending <code>/info</code> to the end of an upload, like <code>/{id}/info</code>.
it returns all stored metadata except for the original filename.
</p>
</main>
</body>
</html>
+12
View File
@@ -0,0 +1,12 @@
{{define "site-header"}}
<div class="site-header">
<h1><a style="text-decoration: none" href="/">minibin</a></h1>
<div>
<a href="/tos">tos</a>
<a href="/privacy">privacy</a>
<a href="/faq">faq</a>
<a href="/report">report</a>
<a href="https://git.whoswhip.dev/whoswhip/minibin">src</a>
</div>
</div>
{{end}}
+73
View File
@@ -0,0 +1,73 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>minibin</title>
<link rel="stylesheet" href="/css/main.css" />
<script defer src="/js/dnd.js"></script>
{{if .Qt}}
<style>
:root {
--qt-url: url("{{.Qt}}");
}
</style>
{{end}}
<meta name="description" content="simple file and paste hosting service" />
<meta property="og:title" content="minibin" />
<meta property="og:description" content="simple file and paste hosting service" />
</head>
<body class="home-page" id="home-page">
{{template "site-header"}}
<main>
<p>simple file and paste hosting service</p>
<div class="upload-tabs">
<input type="radio" name="upload-type" id="type-file" checked />
<label for="type-file">file</label>
<input type="radio" name="upload-type" id="type-paste" />
<label for="type-paste">paste</label>
<div class="file-panel">
<form action="/upload?return=html" method="post" enctype="multipart/form-data">
<label class="muted" for="file-expiry">expiry</label>
<select id="file-expiry" name="expiry">
{{range .Expiries}}
<option value="{{.Label}}">{{.Label}}</option>
{{end}}
</select>
<label class="muted" for="file-id-length">id length</label>
<select id="file-id-length" name="idlength">
<option value="long">16 characters</option>
<option value="short">10 characters</option>
</select>
<input id="upload-file" type="file" required name="file" />
<div class="submit-container">
<button type="submit" class="btn">upload file</button>
<span class="muted">max {{.FileMaxSize}}</span>
</div>
</form>
</div>
<div class="paste-panel">
<form action="/upload?return=html" method="post">
<label class="muted" for="paste-expiry">expiry</label>
<select id="paste-expiry" name="expiry">
{{range .Expiries}}
<option value="{{.Label}}">{{.Label}}</option>
{{end}}
</select>
<label class="muted" for="paste-id-length">id length</label>
<select id="paste-id-length" name="idlength">
<option value="long">16 characters</option>
<option value="short">10 characters</option>
</select>
<textarea id="content" name="content" rows="10" required placeholder="{{.PastePlaceholder}}"></textarea>
<div class="submit-container">
<button type="submit" class="btn">upload paste</button>
<span class="muted">max {{.PasteMaxSize}}</span>
</div>
</form>
</div>
</div>
</main>
</body>
</html>
+47
View File
@@ -0,0 +1,47 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>privacy | minibin</title>
<link rel="stylesheet" href="/css/main.css" />
{{if .}}
<style>
:root {
--qt-url: url("{{.}}");
}
</style>
{{end}}
</head>
<body>
{{template "site-header"}}
<main>
<h2>privacy policy</h2>
<h3>what we store</h3>
<p>when you upload a file or paste, we store:</p>
<ul>
<li>the file or paste content</li>
<li>the original filename, type, and size</li>
<li>an upload id and a SHA256 hash of the content</li>
<li>timestamps and the selected expiry</li>
<li>a deletion token</li>
</ul>
<p>
this information is used to serve uploads, check expiry, and allow
deletion of uploads.
</p>
<h3>who can access uploads</h3>
<p>
anyone with the id of an upload can access and share it. minibin's
operator can also access stored uploads. avoid uploading anything
private.
</p>
<h3>changes to this policy</h3>
<p>
this policy may change as minibin changes. updates will be posted on
this page.
</p>
</main>
</body>
</html>
+49
View File
@@ -0,0 +1,49 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>report | minibin</title>
<link rel="stylesheet" href="/css/main.css" />
<script defer src="/js/report.js"></script>
{{if .Qt}}
<style>
:root {
--qt-url: url("{{.Qt}}");
}
</style>
{{end}}
</head>
<body>
{{template "site-header"}}
<main>
<noscript class="noscript">
Javascript is required when reporting to compute a proof-of-work challenge. Without solving the challenge you cannot submit a report.
</noscript>
<form
method="post"
id="report-form"
data-challenge-difficulty="{{.Challenge.Difficulty}}"
data-challenge-expires-at="{{.Challenge.ExpiresAt}}"
data-challenge-data="{{.Challenge.Data}}"
>
<input id="pow-result" type="hidden" name="pow_result">
<input id="pow-nonce" type="hidden" name="pow_nonce">
<input type="hidden" name="pow_challenge_id" value="{{.Challenge.Id}}">
<label class="muted" for="upload_id">upload id</label>
<input type="text" name="upload_id" required>
<label class="muted" for="report_reason">reason</label>
<select class="full-dropdown" id="report-reason" name="report_reason">
{{range .ReportOptions}}
<option value="{{.}}">{{.}}</option>
{{end}}
</select>
<div class="submit-container">
<button id="submit-btn" type="submit" class="btn loading" disabled>submit</button>
<span id="pow-label">computing proof of work</span>
</div>
</form>
</main>
</body>
</html>
+23
View File
@@ -0,0 +1,23 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{{.Title}} | minibin</title>
<link rel="stylesheet" href="/css/main.css" />
{{if .Qt}}
<style>
:root {
--qt-url: url("{{.Qt}}");
}
</style>
{{end}}
</head>
<body>
{{template "site-header"}}
<main>
<h2>{{.Title}}</h2>
<p>{{.Message}}</p>
</main>
</body>
</html>
+53
View File
@@ -0,0 +1,53 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>tos | minibin</title>
<link rel="stylesheet" href="/css/main.css" />
{{if .}}
<style>
:root {
--qt-url: url("{{.}}");
}
</style>
{{end}}
</head>
<body>
{{template "site-header"}}
<main>
<h2>terms of service</h2>
<p>by using minibin, you agree to these terms.</p>
<h3>acceptable use</h3>
<p>
you are responsible for what you upload and share. only upload content
that you own or are allowed to share.
</p>
<h3>prohibited content</h3>
<p>do not upload or share:</p>
<ul>
<li>child sexual abuse or exploitation material</li>
<li>malware, viruses, or files intended to harm other people</li>
<li>extreme gore</li>
<li>copyright infringing material</li>
</ul>
<h3>storage and expiry</h3>
<p>
uploads have an expiry based on the option selected when uploading.
indefinite means there is no scheduled expiry.
</p>
<p>
uploads may be removed earlier for breaking these terms, maintenance or
storage limits. ensure you keep a copy of anything important.
</p>
<h3>deleting uploads</h3>
<p>
keep the delete token provided after uploading. anyone with that token
is able to delete the upload, so keep it private.
</p>
<h3>changes to these terms</h3>
<p>these terms may change, updates with be posted on this page.</p>
</main>
</body>
</html>
+105
View File
@@ -0,0 +1,105 @@
<!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" />
{{if .Qt}}
<style>
:root {
--qt-url: url("{{.Qt}}");
}
</style>
{{end}}
</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>