A website for temporary file- or text hosting https://trash.ctdo.de/
Go to file
neri 82b2bd4075 add readme, extract init-db script 2020-07-09 22:01:25 +02:00
src add readme, extract init-db script 2020-07-09 22:01:25 +02:00
static finish it i guess 2020-07-09 19:27:32 +02:00
template finish it i guess 2020-07-09 19:27:32 +02:00
.env Initial commit 2020-07-08 21:33:48 +02:00
.gitignore Initial commit 2020-07-08 21:33:48 +02:00
Cargo.lock finish it i guess 2020-07-09 19:27:32 +02:00
Cargo.toml finish it i guess 2020-07-09 19:27:32 +02:00
README.md add readme, extract init-db script 2020-07-09 22:01:25 +02:00
init-db.sql add readme, extract init-db script 2020-07-09 22:01:25 +02:00
screenshot.png add readme, extract init-db script 2020-07-09 22:01:25 +02:00

README.md

datatrash

A file and text uploading service with configurable time limit

Application screenshot

compiling

Compiling is a little strange. The SQL-statements are checked for correctness at compile-time, unfortunately this means that the database needs to be running at compile-time too.

To get set up:

  • Start a postgresql somewhere
  • Set its connection url in the .env file
  • Run the init-db.sql script in the database (cat init-db.sql | psql)
  • Build the project cargo build --release

running & config

At runtime the environment variable DATABASE_URL must be set (e.g. postgres://localhost). A folder named files needs to be created next to the application.

Other things are not configurable yet.

  • The application listens on port 8000
  • The server url is http://localhost:8000/
  • The upload limit is 8MiB
  • The maximum filename length is 255
  • The uploaded files are stored in the files directory