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
|
|
|
|
2019-01-02 20:42:39 +08:00
|
|
|
# 优点
|
|
|
|
|
|
|
|
- 无依赖(单一文件)
|
|
|
|
- 自动同步
|
|
|
|
- 失败自动修复
|
|
|
|
- 按天分目录方便维护
|
|
|
|
- 文件去重
|
2019-01-03 10:13:22 +08:00
|
|
|
- 支持浏览器上传
|
2019-01-02 20:42:39 +08:00
|
|
|
|
|
|
|
|
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
|
|
|
|
{
|
2019-01-03 10:13:22 +08:00
|
|
|
"绑定端号":"端口",
|
2019-01-02 18:56:25 +08:00
|
|
|
"addr": ":8080",
|
2019-01-03 10:13:22 +08:00
|
|
|
"集群":"集群列表",
|
2019-01-02 18:56:25 +08:00
|
|
|
"peers":["http://10.1.50.xx:8080","http://10.1.14.xx:8080","http://10.1.50.xx:8080"],
|
2019-01-03 10:13:22 +08:00
|
|
|
"组号":"组号",
|
2019-01-02 18:56:25 +08:00
|
|
|
"group":"group1",
|
|
|
|
"refresh_interval":120,
|
2019-01-03 10:13:22 +08:00
|
|
|
"是否自动重命名":"真假",
|
2019-01-02 18:56:25 +08:00
|
|
|
"rename_file":false,
|
2019-01-03 10:13:22 +08:00
|
|
|
"是否支持WEB上专":"真假",
|
|
|
|
"enable_web_upload":true,
|
|
|
|
"是否显示目录":"真假",
|
2019-01-02 18:56:25 +08:00
|
|
|
"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
|
|
|
|
2019-01-03 10:13:22 +08:00
|
|
|
`curl -F file=@http-index-fs http://10.1.50.90:8080/upload`
|
|
|
|
|