Files
yamaf/src/index.html
2025-11-16 18:39:35 +05:30

46 lines
1.1 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>{{TITLE}}</title>
</head>
<body>
<h1>{{TITLE}}</h1>
<p>
Use curl to upload:
<br>
<code>
curl -F file=@"[file]" {{USER_URL}}
</code>
<br>
<br>
If key is enabled then a field "key" will be required.
<br>
Make sure the key is the first field in the multipart before any files.
<br>
<code>
curl -F "key=[key]" -F file=@"[file]" -F file=@"[file2]" {{USER_URL}}
</code>
</p>
<form method="post" enctype="multipart/form-data">
{{KEY_FIELD}}
<input type="file" name="file" multiple>
<br>
<button type="submit">Upload</button>
</form>
<!-- CLEANUP_START -->
<h4>Cleanup</h4>
File retention is as per the following formula
<pre><code>
max_size = {{MAX_SIZE}} // in megabytes
max_days = {{MAX_DAYS}}
min_days = {{MIN_DAYS}}
retention = min_days + (max_days - min_days) * (1 - file_size / max_size) ^ e
</code></pre>
Cleanup happens everyday when midnight (IST) has passed
<!-- CLEANUP_END -->
</html>