File sharing server for small files
https://postit.piggo.space
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.4 KiB
49 lines
1.4 KiB
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<title>Post-it!</title>
|
|
<meta charset="utf-8">
|
|
</head>
|
|
<body>
|
|
<h1>Welcome to Post-it!</h1>
|
|
|
|
<p>Post-it is a tiny file sharing server for small files with limited lifespan.</p>
|
|
|
|
<h2>API quickstart</h2>
|
|
|
|
<h3>Submit a file: POST binary body to "/"</h3>
|
|
|
|
<ul>
|
|
<li>Accepts <code>X-Expire</code> (secs) and <code>Content-Type</code> headers.
|
|
<li>Also accepts an <code>expire</code> URL param.
|
|
<li>Returns a secret token in the <code>X-Secret</code> header, and a File ID in response body.
|
|
</ul>
|
|
|
|
<h3>Read a file: GET /<file-id></h3>
|
|
<ul>
|
|
<li>The remaining lifespan is returned in an <code>X-Expire</code> header (secs).
|
|
</ul>
|
|
|
|
<h3>Update a file: PUT to /<file-id></h3>
|
|
<ul>
|
|
<li>Accepts the same headers and params as POST.
|
|
<li>Body may be left empty to leave it unchanged.
|
|
<li>File's lifespan can be extended by setting a new expiration time.
|
|
<li>Requires the secret token as an <code>X-Secret</code> header or a <code>secret</code> URL param.
|
|
</ul>
|
|
|
|
<h3>Delete a file: DELETE /<file-id></h3>
|
|
<ul>
|
|
<li>The secret token is required, like with PUT.
|
|
</ul>
|
|
|
|
<p>See the git repository for a more detailed README.</p>
|
|
|
|
<h2>Source code</h2>
|
|
|
|
<p>Post-it is written in Rust.</p>
|
|
|
|
<p>Get the sources at: <a href="https://git.ondrovo.com/MightyPork/postit">https://git.ondrovo.com/MightyPork/postit</a></p>
|
|
|
|
</body>
|
|
</html>
|
|
|