2018-12-29 20:29:38 +08:00
|
|
|
# 简单文件服务器
|
2018-12-29 20:31:01 +08:00
|
|
|
- 支持curl命令上传
|
|
|
|
- 支持浏览器上传
|
2018-12-29 20:29:38 +08:00
|
|
|
- 支持下载
|
2018-12-30 18:22:04 +08:00
|
|
|
- 支持多机自动同步
|
2019-01-02 18:50:35 +08:00
|
|
|
- 类fastdfs
|
|
|
|
- 高性能
|
|
|
|
- 高可靠
|
2018-12-29 20:29:38 +08:00
|
|
|
|
|
|
|
|
2018-12-30 18:22:04 +08:00
|
|
|
# 启动服务器
|
|
|
|
|
2019-01-02 18:50:35 +08:00
|
|
|
`./fileserver`
|
2018-12-30 18:22:04 +08:00
|
|
|
|
2019-01-02 18:56:25 +08:00
|
|
|
# 配置 (conf/cfg.json)
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
"addr": ":8080",
|
|
|
|
"peers":["http://10.1.50.xx:8080","http://10.1.14.xx:8080","http://10.1.50.xx:8080"],
|
|
|
|
"group":"group1",
|
|
|
|
"refresh_interval":120,
|
|
|
|
"rename_file":false,
|
|
|
|
"show_dir":true
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2018-12-29 20:31:01 +08:00
|
|
|
|
2018-12-29 20:29:38 +08:00
|
|
|
# 上传命令
|
2018-12-29 20:31:01 +08:00
|
|
|
|
2018-12-29 20:33:47 +08:00
|
|
|
`curl -F file=@http-index-fs http://10.1.50.90:8080/upload -F "name=http-index-fs" -F "md5=9412f6e58baa25550ab8b34e9778ffd4"`
|
|
|
|
```
|
2018-12-29 20:31:01 +08:00
|
|
|
说明:
|
|
|
|
name=目标名称(选填)
|
|
|
|
md5=文件的md5(选填)
|
2018-12-29 20:29:38 +08:00
|
|
|
```
|