The goal of this project is to make a db-like local storage system for files.
It does not implement any security as it's not designed to be facing the user directly
// Compressed data node :D
-
Backend It works well.
Streaming compression and decompression makes it really fast and efficientCould really use a dashboard system
-
Front-end Uses streaming for upload so it's fast
A good design is still needed
But it works
- The actual server
- WASM front end
- Homepage
- Upload
Idk if any security is needed (ouside something against DDoS or spam but i wont do that here)
About file size, we really should set a limit, even like a rly high one, but a limit is needed.
(See the file
default.limit in Rocket.toml)
First, download the projects with
git clone https://github.com/bowarc/storage_server
cd ./storage_server
In each build script (./scripts
, you'll find mode=debug # debug, release
at the top,
replace debug
with release
to build a more optimized version of the program (build time will be slower)
Start by running sh scripts/init.sh
This will create some important folders in the project directory, which the server relies on.
sh scripts/build.sh
sh scripts/build_back.sh
sh scripts/build_front.sh
To run the server, use sh scripts/run.sh
curl --upload_file ./file.ext http://<YOUR_ADDRESS:YOUR_PORT>/
This yields back an uuid that is used by the server to identify that file
curl http://<YOUR_ADDRESS:YOUR_PORT>/<UUID>/file.ext -O
NOTE: On browser you only need the UUID as it auto redirects to the right file name (
http://<YOUR_ADDRESS:YOUR_PORT>/<UUID>
->http://<YOUR_ADDRESS:YOUR_PORT>/<UUID>/file.ext
).
Take a look at #7 for more informations.