forked from natto1784/yamaf
feature: add cleanup
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
@@ -1,31 +1,45 @@
|
||||
<!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>
|
||||
<div id="progress-container"></div>
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user