{"id":13503060,"url":"https://github.com/raftario/filite","last_synced_at":"2025-10-18T23:09:28.199Z","repository":{"id":35420004,"uuid":"215301661","full_name":"raftario/filite","owner":"raftario","description":"A simple, light and standalone pastebin, URL shortener and file-sharing service","archived":false,"fork":false,"pushed_at":"2023-04-16T20:38:29.000Z","size":437,"stargazers_count":190,"open_issues_count":23,"forks_count":16,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-01T23:41:27.837Z","etag":null,"topics":["file-sharing","files","links","pastebin","texts","url-shortener"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/raftario.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-10-15T13:08:55.000Z","updated_at":"2025-01-24T19:54:12.000Z","dependencies_parsed_at":"2024-01-13T22:54:29.838Z","dependency_job_id":"b61fe75f-d066-4267-a785-23a8241dda91","html_url":"https://github.com/raftario/filite","commit_stats":{"total_commits":112,"total_committers":6,"mean_commits":"18.666666666666668","dds":0.0982142857142857,"last_synced_commit":"9bfc19f8b77b0f92e70918f72f397e46006f3f41"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raftario%2Ffilite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raftario%2Ffilite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raftario%2Ffilite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raftario%2Ffilite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raftario","download_url":"https://codeload.github.com/raftario/filite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247353746,"owners_count":20925329,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["file-sharing","files","links","pastebin","texts","url-shortener"],"created_at":"2024-07-31T22:02:35.271Z","updated_at":"2025-10-18T23:09:23.137Z","avatar_url":"https://github.com/raftario.png","language":"Rust","funding_links":[],"categories":["Rust","Install from Source","Software","others"],"sub_categories":["Pastebins"],"readme":"# filite\n\n**THIS PROJECT IS CURRENTLY UNMAINTAINED AS I NO LONGER USE IT MYSELF AND DO NOT HAVE THE TIME NOR ENERGY TO COMMIT TO MAINTAINING IT. SORRY.**\n\n\u003e The `master` branch isn't actively maintained anymore, and the current development branch, `next`, will be merged into it in the near future.\n\nA simple, light and standalone pastebin, URL shortener and file-sharing service that hosts **fi**les, redirects **li**nks and stores **te**xts.\n\n[![GitHub Actions](https://github.com/raftario/filite/workflows/Build/badge.svg)](https://github.com/raftario/filite/actions?workflowID=Build)\n[![Crates.io](https://img.shields.io/crates/v/filite.svg)](https://crates.io/crates/filite)\n\n[Live Example](https://filite.raphaeltheriault.com) (file upload disabled and rate limited)\n\n## Table of Contents\n\n- [filite](#filite)\n  - [Table of Contents](#table-of-contents)\n  - [Features](#features)\n    - [What it is](#what-it-is)\n    - [What it is not](#what-it-is-not)\n  - [Installation](#installation)\n  - [Usage](#usage)\n  - [Planned features](#planned-features)\n  - [Config](#config)\n  - [Client tools](#client-tools)\n    - [ShareX](#sharex)\n      - [File](#file)\n      - [Link](#link)\n      - [Text](#text)\n  - [Reverse proxy](#reverse-proxy)\n    - [NGINX](#nginx)\n    - [Apache](#apache)\n  - [Programmatic usage](#programmatic-usage)\n    - [Listing existing entries](#listing-existing-entries)\n    - [Creating new entries](#creating-new-entries)\n      - [Files](#files)\n      - [Links](#links)\n      - [Texts](#texts)\n    - [Deleting entries](#deleting-entries)\n  - [Contributing](#contributing)\n    - [Requirements](#requirements)\n    - [Setup](#setup)\n  - [License](#license)\n\n## Features\n\n### What it is\n\n* Easy to use. Installation and set-up take less than a minute and a built-in web UI is provided.\n* Standalone. No external dependencies required, everything that is needed is packed into the binary.\n* Light and fast. The Rust web framework [Actix](https://actix.rs) is used under the hood, providing great speed with a minimal footprint.\n\n### What it is not\n\n* A tracking tool. No stats are stored to increase speed, reduce resource usage and maintain simplicity, if this is what you are looking for filite is not for you.\n\n## Installation\n\n1. Get the binary either from the [releases page](https://github.com/raftario/filite/releases) or [using Cargo](https://crates.io/crates/filite)\n2. Run `filite init` to perform the initial setup (you can do this at any time to reset the config and password)\n3. Edit your config file as you see fit (check the [dedicated section](#config) for details)\n4. Run `filite`\n\nThat's it!\n\n## Usage\n\nWhen asked for a login, use whatever username you want and the password you provided during setup.\nDetails for programmatic usage are provided in [the dedicated section](#programmatic-usage).\n\n## Planned features\n\n* Decent test suite\n* TLS support\n* Simple admin page\n* Multiple logins (?)\n\n## Config\n\n```toml\n# Port to listen on\nport = 8080\n# SQLite database connection url\ndatabase_url = \"database.db\"\n# SQLite database connection pool size\npool_size = 4\n# Directory where to store static files\nfiles_dir = \"files\"\n\n# Highlight.js configuration\n[highlight]\n# Theme to use\ntheme = \"github\"\n# Additional languages to include\nlanguages = [\"rust\"]\n```\n\n## Client tools\n\n### ShareX\n\n- `\u003cAUTHORIZATION\u003e` is the result of encoding `\u003cUSERNAME\u003e:\u003cPASSWORD\u003e` to base64\n  - `\u003cUSERNAME\u003e` is an arbitrary username, it doesn't matter\n  - `\u003cPASSWORD\u003e` is the password entered during setup\n- `\u003cADDRESS\u003e` is the root address where the filite is running, for instance `http://localhost:8080` or `https://filite.raphaeltheriault.com`\n\n#### File\n\n```json\n{\n  \"Version\": \"13.0.1\",\n  \"Name\": \"filite (file)\",\n  \"DestinationType\": \"ImageUploader, FileUploader\",\n  \"RequestMethod\": \"POST\",\n  \"RequestURL\": \"\u003cADDRESS\u003e/f\",\n  \"Headers\": {\n    \"Authorization\": \"Basic \u003cAUTORIZATION\u003e\"\n  },\n  \"Body\": \"MultipartFormData\",\n  \"FileFormName\": \"file\",\n  \"URL\": \"\u003cADDRESS\u003e/$response$\"\n}\n```\n\n#### Link\n\n```json\n{\n  \"Version\": \"13.0.1\",\n  \"Name\": \"filite (link)\",\n  \"DestinationType\": \"URLShortener\",\n  \"RequestMethod\": \"POST\",\n  \"RequestURL\": \"\u003cADDRESS\u003e/l\",\n  \"Headers\": {\n    \"Authorization\": \"Basic \u003cAUTORIZATION\u003e\"\n  },\n  \"Body\": \"JSON\",\n  \"Data\": \"{\\\"forward\\\":\\\"$input$\\\"}\",\n  \"URL\": \"\u003cADDRESS\u003e/l/$response$\"\n}\n```\n\n#### Text\n\n\u003e You can remove the prompt and always enable or disable syntax highlighting by replacing `$prompt:Highlight|false$` with `true` or `false`.\n\n```json\n{\n  \"Version\": \"13.0.1\",\n  \"Name\": \"filite (text)\",\n  \"DestinationType\": \"TextUploader\",\n  \"RequestMethod\": \"POST\",\n  \"RequestURL\": \"\u003cADDRESS\u003e/t\",\n  \"Headers\": {\n    \"Authorization\": \"Basic \u003cAUTORIZATION\u003e\"\n  },\n  \"Body\": \"JSON\",\n  \"Data\": \"{\\\"contents\\\":\\\"$input$\\\",\\\"highlight\\\":$prompt:Highlight|false$}\",\n  \"URL\": \"\u003cADDRESS\u003e/t/$response$\"\n}\n```\n\n## Reverse proxy\n\n- `\u003cDOMAIN\u003e` is the domain the requests will be coming from, for instance `filite.raphaeltheriault.com`\n- `\u003cPORT\u003e` is the port on which filite is listening\n\n\u003e Upload limits are set to 10M as an example\n\n### NGINX\n\n```nginx\nserver {\n  listen 80;\n  listen [::]:80;\n\n  server_name \u003cDOMAIN\u003e;\n\n  location / {\n    proxy_pass http://localhost:\u003cPORT\u003e;\n\n    location /f {\n      client_max_body_size 10M;\n    }\n  }\n}\n```\n\n### Apache\n\n```apache\n\u003cVirtualHost *:80\u003e\n  ServerName \u003cDOMAIN\u003e\n\n  ProxyPreserveHost On\n  ProxyPass / http://localhost:\u003cPORT\u003e/\n  ProxyPassReverse / http://localhost:\u003cPORT\u003e/\n\n  \u003cLocation \"/f\"\u003e\n    LimitRequestBody 10000000\n  \u003c/Location\u003e\n\u003c/VirtualHost\u003e\n```\n\n## Programmatic usage\n\n\u003e All requests that require authentication use HTTP Basic Auth (without taking the username into account).\n\n### Listing existing entries\n\nIt's possible to get an array of all existing entries for each type with an authenticated request.\n\n- `GET /f`\n- `GET /l`\n- `GET /t`\n\nYou can view the created entries in a more organized manner with the third-party [filite-list](https://github.com/Syndamia/filite-list) script.\n\n### Creating new entries\n\nThere are two ways to create new entries, `PUT` or `POST` requests.\n`PUT` lets you choose the ID manually and `POST` assigns a free one automatically, but that's the only difference.\nBoth methods require authentication.\n\n\u003e `PUT` requests will overwrite any existing entry.\n\n#### Files\n\n- `PUT /f/{id}`\n- `POST /f`\n\nFiles are sent as `multipart/form-data`. The field name isn't important but the file name needs to be included. Only one file is treated.\n\n#### Links\n\n- `PUT /l/{id}`\n- `POST /l`\n\nLinks are sent as `application/json` according to the following schema.\n\n```json\n{\n  \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n  \"title\": \"Link\",\n  \"type\": \"object\",\n  \"properties\": {\n    \"forward\": {\n      \"description\": \"URL this link forwards to\",\n      \"type\": \"string\"\n    }\n  }\n}\n```\n\n#### Texts\n\n- `PUT /t/{id}`\n- `POST /t`\n\nTexts are sent as `application/json` according to the following schema.\n\n```json\n{\n  \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n  \"title\": \"Text\",\n  \"type\": \"object\",\n  \"properties\": {\n    \"contents\": {\n      \"description\": \"Text contents\",\n      \"type\": \"string\"\n    },\n    \"highlight\": {\n      \"description\": \"Whether to enable code highlighting or not for that text\",\n      \"type\": \"boolean\"\n    }\n  }\n}\n```\n\n### Deleting entries\n\nIt's possible to delete any entry with an authenticated request.\n\n- `DELETE /f`\n- `DELETE /l`\n- `DELETE /t`\n\n## Contributing\n\nThe project is open to contributions! Before submitting a PR, make sure your changes work both with and without the `dev` feature enabled.\n\n### Requirements\n\n* The Rust toolchain\n* [diesel_cli](https://github.com/diesel-rs/diesel/tree/master/diesel_cli) with the `sqlite` feature enabled\n\n### Setup\n\n1. Copy [`.env.example`](./.env.example) to `.env` and set the variables to your liking\n2. Run `diesel database setup`\n3. Build or run with the `dev` feature enabled\n\n## License\n\nfilite is licensed under the [MIT License](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraftario%2Ffilite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraftario%2Ffilite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraftario%2Ffilite/lists"}