A simple, light and standalone pastebin, URL shortener and file-sharing service that hosts files, redirects links and stores texts.
8080 with the port specified in your config)When asked for a login, use whatever username you want and the password you provided during setup. Usage is pretty straightforward using the web UI, but here are some tips.
Details for programmatic usage are provided in the dedicated section.
The config is located at ~/.filite/config.toml and follows the following format. Most of the time, the defaults are reasonable.
```toml
port = 8080
database_url = "database.db"
pool_size = 4
files_dir = "files"
max_filesize = 10000000 ```
Don't forget to replace 8080 with the port specified in your config and example.com with your own domain.
```nginx server { listen 8080; listen [::]:8080;
server_name example.com;
location / {
proxy_pass http://localhost:8080;
}
} ```
Send a PUT request with a JSON body following the following schemes. Don't forget to set the Content-Type header to application/json and the Authorization header to a valid value (username isn't important).
PUT /f/id
json
{
"base64": "Base64-encoded file",
"filename": "Filename"
}
PUT /l/id
json
{
"forward": "URL to forward to"
}
PUT /t/id
json
{
"contents": "Text contents"
}
The response will be a JSON array following the following schemes
GET /f
json
[
{
"id": "ID (URL) as an integer",
"filepath": "Absolute path to the stored file",
"created": "Creation timestamp"
}
]
GET /l
json
[
{
"id": "ID (URL) as an integer",
"forward": "URL to forward to",
"created": "Creation timestamp"
}
]
GET /t
json
[
{
"id": "ID (URL) as an integer",
"contents": "Text contents",
"created": "Creation timestamp"
}
]
The project is open to contributions! Before submitting a PR, make sure your changes work both with and without the dev feature enabled.
sqlite feature enabled.env.example to .env and set the variables to your likingdiesel database setupdev feature enabledfilite is licensed under the MIT License.