Skip to content

a simple POST GET file storage server, high throughput, no compression

Notifications You must be signed in to change notification settings

rankun203/go-file-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-file-server Go docker pull rankun203/openconnect-proxy

You can POST / GET / list files to this server.

Features

  1. upload file: POST http://localhost:3000/upload
  2. download file: GET http://localhost:3000/download/file.ext
  3. list files: GET http://localhost:3000/files

User manual

Try to upload a file using the following command:

upload:

curl -v -F "file=@/path/to/file.ext" http://localhost:3000/upload
curl -v -F "file=@/path/to/some.zip;filename=fancy.zip" http://localhost:3000/upload

download:

curl -O http://localhost:3000/download/file.ext
curl -O http://localhost:3000/download/fancy.zip

list files:

curl http://localhost:3000/files

Compress files:

tar -cf compressed.tar /path/to/directory
tar -cf - /path/to/directory | pigz > compressed.tar.gz
tar -czf compressed.tar.gz /path/to/directory

Decompress files:

tar -xf compressed.tar
tar -xzf compressed.tar.gz

Docker

Build docker image

docker build -t go-file-server .

Run docker image

docker run -p 3000:3000 go-file-server

# or use existing docker image
docker run -p 3000:3000 rankun203/go-file-server

Visit http://localhost:3000.

About

a simple POST GET file storage server, high throughput, no compression

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published