All Projects → raftario → Filite

raftario / Filite

Licence: mit
A simple, light and standalone pastebin, URL shortener and file-sharing service

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Filite

nnmm
A super tiny pastebin/url minifier "microservice"
Stars: ✭ 77 (-38.4%)
Mutual labels:  pastebin, url-shortener
yogurl
Serve files and code over HTTP in one command. The CLI for http://yogurl.io
Stars: ✭ 45 (-64%)
Mutual labels:  files, file-sharing
Sharex
ShareX is a free and open source program that lets you capture or record any area of your screen and share it with a single press of a key. It also allows uploading images, text or other types of files to many supported destinations you can choose from.
Stars: ✭ 18,143 (+14414.4%)
Mutual labels:  url-shortener, file-sharing
Dogbin
The sexiest pastebin and url shortener ever
Stars: ✭ 237 (+89.6%)
Mutual labels:  url-shortener, pastebin
kipp
A flexible file storage server
Stars: ✭ 33 (-73.6%)
Mutual labels:  files, file-sharing
pste
Just a simple file hosting application inspired by the likes of pomf.se and teknik.io.
Stars: ✭ 22 (-82.4%)
Mutual labels:  pastebin, file-sharing
react-magic-dropzone
✨Magically drag and drop files/links for uploading
Stars: ✭ 11 (-91.2%)
Mutual labels:  files, links
Psitransfer
Simple open source self-hosted file sharing solution.
Stars: ✭ 712 (+469.6%)
Mutual labels:  file-sharing, pastebin
rustypaste
A minimal file upload/pastebin service.
Stars: ✭ 102 (-18.4%)
Mutual labels:  pastebin, file-sharing
lolisafe
Blazing fast file uploader and awesome bunker written in node! 🚀
Stars: ✭ 181 (+44.8%)
Mutual labels:  files, file-sharing
Pomf
Simple file uploading and sharing
Stars: ✭ 535 (+328%)
Mutual labels:  file-sharing, files
Linx Server
Self-hosted file/code/media sharing website. ~~~~~~~~~~~~~~~~~~~ Demo: https://demo.linx-server.net/
Stars: ✭ 1,044 (+735.2%)
Mutual labels:  file-sharing, pastebin
Contentmanager
Android library for getting photo or video from a device gallery, cloud or camera. Working with samsung devices. Made by Stfalcon
Stars: ✭ 108 (-13.6%)
Mutual labels:  files
Reading Material
List of some useful blogs, books, courses, papers etc. 📚
Stars: ✭ 116 (-7.2%)
Mutual labels:  links
Best Websites A Programmer Should Visit
🔗 Some useful websites for programmers.
Stars: ✭ 44,744 (+35695.2%)
Mutual labels:  links
Links Uteis
📎 Lista de links úteis para o desenvolvimento de projetos de programação e design
Stars: ✭ 2,032 (+1525.6%)
Mutual labels:  links
Webdrop
Easiest group P2P File & Message transfer in browser with WebRTC 🔥. Cross-platform alternative to Apple's AirDrop, Xender, ShareIT with the same speed over LAN. No installation, just a website :)
Stars: ✭ 119 (-4.8%)
Mutual labels:  file-sharing
Long Live Pomf
Pomf.se alternatives
Stars: ✭ 115 (-8%)
Mutual labels:  file-sharing
Airdcpp Webclient
Communal peer-to-peer file sharing application for file servers/NAS devices
Stars: ✭ 106 (-15.2%)
Mutual labels:  file-sharing
Openssh Portable
Portable OpenSSH
Stars: ✭ 1,696 (+1256.8%)
Mutual labels:  file-sharing

filite

The master branch isn't actively maintained anymore, and the current development branch, next, will be merged into it in the near future.

A simple, light and standalone pastebin, URL shortener and file-sharing service that hosts files, redirects links and stores texts.

GitHub Actions Crates.io

Live Example (file upload disabled and rate limited)

Table of Contents

Features

What it is

  • Easy to use. Installation and set-up take less than a minute and a built-in web UI is provided.
  • Standalone. No external dependencies required, everything that is needed is packed into the binary.
  • Light and fast. The Rust web framework Actix is used under the hood, providing great speed with a minimal footprint.

What it is not

  • 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.

Installation

  1. Get the binary either from the releases page or using Cargo
  2. Run filite init to perform the initial setup (you can do this at any time to reset the config and password)
  3. Edit your config file as you see fit (check the dedicated section for details)
  4. Run filite

That's it!

Usage

When asked for a login, use whatever username you want and the password you provided during setup. Details for programmatic usage are provided in the dedicated section.

Planned features

  • Decent test suite
  • TLS support
  • Simple admin page
  • Multiple logins (?)

Config

# Port to listen on
port = 8080
# SQLite database connection url
database_url = "database.db"
# SQLite database connection pool size
pool_size = 4
# Directory where to store static files
files_dir = "files"

# Highlight.js configuration
[highlight]
# Theme to use
theme = "github"
# Additional languages to include
languages = ["rust"]

Client tools

ShareX

  • <AUTHORIZATION> is the result of encoding <USERNAME>:<PASSWORD> to base64
    • <USERNAME> is an arbitrary username, it doesn't matter
    • <PASSWORD> is the password entered during setup
  • <ADDRESS> is the root address where the filite is running, for instance http://localhost:8080 or https://filite.raphaeltheriault.com

File

{
  "Version": "13.0.1",
  "Name": "filite (file)",
  "DestinationType": "ImageUploader, FileUploader",
  "RequestMethod": "POST",
  "RequestURL": "<ADDRESS>/f",
  "Headers": {
    "Authorization": "Basic <AUTORIZATION>"
  },
  "Body": "MultipartFormData",
  "FileFormName": "file",
  "URL": "<ADDRESS>/$response$"
}

Link

{
  "Version": "13.0.1",
  "Name": "filite (link)",
  "DestinationType": "URLShortener",
  "RequestMethod": "POST",
  "RequestURL": "<ADDRESS>/l",
  "Headers": {
    "Authorization": "Basic <AUTORIZATION>"
  },
  "Body": "JSON",
  "Data": "{\"forward\":\"$input$\"}",
  "URL": "<ADDRESS>/l/$response$"
}

Text

You can remove the prompt and always enable or disable syntax highlighting by replacing $prompt:Highlight|false$ with true or false.

{
  "Version": "13.0.1",
  "Name": "filite (text)",
  "DestinationType": "TextUploader",
  "RequestMethod": "POST",
  "RequestURL": "<ADDRESS>/t",
  "Headers": {
    "Authorization": "Basic <AUTORIZATION>"
  },
  "Body": "JSON",
  "Data": "{\"contents\":\"$input$\",\"highlight\":$prompt:Highlight|false$}",
  "URL": "<ADDRESS>/t/$response$"
}

Reverse proxy

  • <DOMAIN> is the domain the requests will be coming from, for instance filite.raphaeltheriault.com
  • <PORT> is the port on which filite is listening

Upload limits are set to 10M as an example

NGINX

server {
  listen 80;
  listen [::]:80;

  server_name <DOMAIN>;

  location / {
    proxy_pass http://localhost:<PORT>;

    location /f {
      client_max_body_size 10M;
    }
  }
}

Apache

<VirtualHost *:80>
  ServerName <DOMAIN>

  ProxyPreserveHost On
  ProxyPass / http://localhost:<PORT>/
  ProxyPassReverse / http://localhost:<PORT>/

  <Location "/f">
    LimitRequestBody 10000000
  </Location>
</VirtualHost>

Programmatic usage

All requests that require authentication use HTTP Basic Auth (without taking the username into account).

Listing existing entries

It's possible to get an array of all existing entries for each type with an authenticated request.

  • GET /f
  • GET /l
  • GET /t

You can view the created entries in a more organized manner with the third-party filite-list script.

Creating new entries

There are two ways to create new entries, PUT or POST requests. PUT lets you choose the ID manually and POST assigns a free one automatically, but that's the only difference. Both methods require authentication.

PUT requests will overwrite any existing entry.

Files

  • PUT /f/{id}
  • POST /f

Files 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.

Links

  • PUT /l/{id}
  • POST /l

Links are sent as application/json according to the following schema.

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Link",
  "type": "object",
  "properties": {
    "forward": {
      "description": "URL this link forwards to",
      "type": "string"
    }
  }
}

Texts

  • PUT /t/{id}
  • POST /t

Texts are sent as application/json according to the following schema.

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Text",
  "type": "object",
  "properties": {
    "contents": {
      "description": "Text contents",
      "type": "string"
    },
    "highlight": {
      "description": "Whether to enable code highlighting or not for that text",
      "type": "boolean"
    }
  }
}

Deleting entries

It's possible to delete any entry with an authenticated request.

  • DELETE /f
  • DELETE /l
  • DELETE /t

Contributing

The project is open to contributions! Before submitting a PR, make sure your changes work both with and without the dev feature enabled.

Requirements

  • The Rust toolchain
  • diesel_cli with the sqlite feature enabled

Setup

  1. Copy .env.example to .env and set the variables to your liking
  2. Run diesel database setup
  3. Build or run with the dev feature enabled

License

filite is licensed under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].