This project is an async web server written with Axum that hosts uploaded images for 12 hours then deletes it after.
To run clone the repository, download Rust, download PostgreSQL and run:
cargo run
- Rust
- PostgreSQL
Web server connects to PostgreSQL database using the DATABASE_URL
and binds to TIMEGATED_PORT
variables in .env
file.
Server hosts images on /img/*.jpeg
. Server accepts multipart request from /upload
endpoint.
- Max 25MB is allowed.
- All images are type checked.
If upload is successful server returns the endpoint the image is hosted at.