Lightweight file sharing system
git clone https://github.com/wanggaolin/go-fileHttp.git && cd go-fileHttp && ./file_http
wget https://github.com/wanggaolin/go-fileHttp/archive/refs/tags/mac-v1.4.tar.gz
tar -xvf mac-v1.4.tar.gz
cd go-fileHttp-mac-v1.4
./file_http
Key | Value | Describe |
---|---|---|
ROOT_DIR | $HOME | File Management Directory |
ERROR_LOG | error.log | error log |
ACCESS_LOG | access.log | access log |
LISTEN | 127.0.0.1:9191 | listen addres |
PUSH | true | enable file uploading |
SHOW_ALL | false | show hidden files |
POSH_BACKUP | false | upload the backup file |
Header | Value | Describe |
---|---|---|
Content-Type | application/json application/text application/html |
Defining return types |
curl -H "Content-Type:application/json" http://127.0.0.1:9090/
curl -H "Content-Type:application/text" http://127.0.0.1:9090/
curl -H "Content-Type:application/html" http://127.0.0.1:9090/
wget http://127.0.0.1:9090/test.log
curl http://127.0.0.1:9090/test.log --output test.log
curl -X POST -F "file=@jquery-3.6.0.min.js" http://127.0.0.1:9090/test/test.log