Lightweight file sharing system
git clone https://github.com/wanggaolin/go-fileHttp.git && cd go-fileHttp && ./file_httpwget 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.logcurl -X POST -F "[email protected]" http://127.0.0.1:9090/test/test.log