Skip to content

Lightweight file sharing system/轻量级GO-HTTP文件共享服务

Notifications You must be signed in to change notification settings

wanggaolin/go-fileHttp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

LANGUAGE

English 中文

Describe

Lightweight file sharing system

demo photo

Install

[for linux]
git clone https://github.com/wanggaolin/go-fileHttp.git && cd go-fileHttp && ./file_http
[for mac]
wget https://github.com/wanggaolin/go-fileHttp/archive/refs/tags/mac-v1.3.tar.gz
tar -xvf mac-v1.3.tar.gz
cd go-fileHttp-mac-v1.3   
./file_http

default config

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

required parameter

Header Value Describe
Content-Type application/json
application/text
application/html
Defining return types

use/example

Get list of files:
curl -H "Content-Type:application/json" http:https://127.0.0.1:9090/
curl -H "Content-Type:application/text" http:https://127.0.0.1:9090/
curl -H "Content-Type:application/html" http:https://127.0.0.1:9090/
Download file:
wget http:https://127.0.0.1:9090/test.log
curl http:https://127.0.0.1:9090/test.log --output test.log
Upload file:
curl -X POST -F "[email protected]" http:https://127.0.0.1:9090/test/test.log

About

Lightweight file sharing system/轻量级GO-HTTP文件共享服务

Resources

Stars

Watchers

Forks

Packages

No packages published