A place to leave your files.
leaves ๐ is a self-hostable file hosting service. Before uploading you need a user account.
If open registration is enabled, then you can create an account by POSTing:
POST /v1/users
{
"email": "[email protected]",
}
You'll get back an API token and user ID:
{
"id": 4761,
"token": "foo bar baz"
}
You can upload files by POSTing a body, with your API token and email:
POST /v1/files
Authorization: Basic [email protected]/token:foo bar baz
post file contents as the body
You'll get back a URL to use:
"https://example.com/61xc90l"
Delete your file by DELETEing it:
DELETE /v1/files/61xc90l
Authorization: Basic [email protected]/token:foo bar baz
List your 100 most recent files:
GET /v1/users/@me/files?limit=100
Authorization: Basic [email protected]/token:foo bar baz
leaves
maintains a SQLite database and automatically runs migrations. All you
need to do is specify where you want your data to be kept, like maybe in a
volume:
$ docker volume create leaves_data
$ docker run -itd --env-file leaves.env -v leaves_data:/data -p 10000:80 vivianis/leaves