Test project.
HTTP File Server - server, providing http API for downloading, uploading and removing files by their md5 hash string. All files store in directory, which is setting up from the config file.
GET /health
Response:
200 OK
Uploading file to the server. File is setting up by the form, field "upload".
POST /upload
Content-Type: multipart/form-data
Response:
200 OK
"file hash"
Downloading file from the server.
POST /download/{file_hash}
Response:
200 OK
"file data"
Removing file by his md5 hash.
POST /delete/{file_hash}
Response:
200 OK
ok
You need to have vgo installed.
go get -u golang.org/x/vgo
- Clone the repository.
- Install dependencies, create the config file.
- Create static files directory, based on config file.
- Launch the project.
git clone https://github.com/lillilli/http_file_server.git && cd http_file_server
make setup && make config
mkdir -p shared/static
make run
- Clone the repository.
- Make image (need some time).
- Launch image (will be available on localhost:8080).
git clone https://github.com/lillilli/http_file_server.git && cd http_file_server
make image
make run:image