Giter Site home page Giter Site logo

leaves's Introduction

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": "[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

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

leaves's People

Contributors

zeylahellyer avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.