Skip to content

A place to leave your files ๐Ÿ‚

License

Notifications You must be signed in to change notification settings

zeylahellyer/leaves

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

43 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

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 ๐Ÿ‚

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published