forked from neri/datatrash
neri deb99942d3 | ||
---|---|---|
src | ||
static | ||
template | ||
.env | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml | ||
Dockerfile | ||
README.md | ||
init-db.sql | ||
screenshot.png |
README.md
datatrash
A file and text uploading service with configurable time limit
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
environment variable | default value |
---|---|
DATABASE_URL | postresql://localhost |
SERVER_URL | http://loalhost:8000 |
FILES_DIR | ./files |
UPLOAD_MAX_BYTES | 8388608 (8MiB) |
BIND_ADDRESS | 0.0.0.0:8000 |
Other things are not configurable yet.
- The maximum filename length is 255