7596ff / leaves

A place to leave your files πŸ‚

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

test badge rust badge license badge

leaves πŸ‚

A place to leave your files.

leaves πŸ‚ is a self-hostable file hosting service. Before uploading you need a user account.

Important routes

If open registration is enabled, then you can create an account by POSTing:

POST /v1/users

{
  "email": "vivian@hellyer.dev",
}

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 vivian@hellyer.dev/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 vivian@hellyer.dev/token:foo bar baz

List your 100 most recent files:

GET /v1/users/@me/files?limit=100
Authorization: Basic vivian@hellyer.dev/token:foo bar baz

Run it

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

About

A place to leave your files πŸ‚

License:ISC License


Languages

Language:Rust 98.5%Language:Dockerfile 1.5%