lidarbtc / Image-server

Simple static image upload and hosting server, written in Rust Actix.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Image-server

simple static image upload and hosting server, written in Rust Actix.

Features

png, jpg, jpeg, gif, webp served as static files.

Usage

$ cargo build --release
$ ./target/release/image-server

API

Upload

$ curl -F "file=@/path/to/image.jpg" -H "Authorization: your_token" -X POST http://localhost:8080/upload

Get

$ curl http://localhost:8080/i/filename.jpg

Delete

$ curl -H "Authorization: your_token" http://localhost:8080/delete/filename.jpg

Environment Variables

Name Description Default
PASSWORD Token for authorization ""
REDIRECT_URI Redirect URI for GET / ""

About

Simple static image upload and hosting server, written in Rust Actix.

License:GNU General Public License v3.0


Languages

Language:Rust 100.0%