Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
v0.0.2
  • Loading branch information
shepf authored Nov 18, 2023
1 parent 9b998d8 commit 4c3b3fc
Showing 1 changed file with 27 additions and 4 deletions.
31 changes: 27 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[English](README.md) | 简体中文
## 🚀HttpCat 概述
## 🚀HttpCat 概述

HttpCat 是一个基于go实现的 HTTP 的文件传输服务,旨在提供简单、高效、稳定的文件上传和下载功能。

Expand All @@ -10,7 +10,7 @@ HttpCat 是一个基于go实现的 HTTP 的文件传输服务,旨在提供简
* 简单易用
* 无需外部依赖,易于移植

## 🎉安装
## 🎉安装
下载:


Expand All @@ -25,11 +25,16 @@ cd httpcat
vi ./conf/svr.yml
```

运行:
linux下运行:
```bash
./httpcat -c conf/svr.yml
```

windows下运行:
```bash
httpcat.exe --upload /home/web/website/download/ --download /home/web/website/download/ -C F:\open_code\httpcat\server\conf\svr.yml
```

```bash
# ./httpcat -h
Usage of ./httpcat:
Expand Down Expand Up @@ -62,6 +67,21 @@ To delete farming session
$ tmux kill-session -t tmux_httpcat
```

### linux可以使用systemd运行在后台
```bash
cp httpcat.service /usr/lib/systemd/system/httpcat.service
systemctl daemon-reload
systemctl start httpcat
```
注意:你可能需要根据你的需要修改启动参数,如下 3个目录一致:
```bash
vi httpcat.service
```
```
ExecStart=/usr/local/bin/httpcat --static=/home/web/website/upload/ --upload=/home/web/website/upload/ --download=/home/web/website/upload/ -C /etc/httpdcat/svr.yml
```


## ❤使用技巧
### 使用curl工具上传文件
```bash
Expand All @@ -84,6 +104,9 @@ curl -vF "f1=@/root/hello.mojo" http://localhost:8888/api/v1/file/upload
下载某个具体的文件
`http://127.0.0.1:8888/api/v1/file/download?filename=xxx.jpg
`
获取某个文件的信息,包括md5
`http://{{ip}}:{{port}}/api/v1/file/fileInfo?name=FlF9mrjXgAAZHon.jpg
`

## 💪TODO
1. 接口增加签名认证机制
Expand All @@ -93,4 +116,4 @@ curl -vF "f1=@/root/hello.mojo" http://localhost:8888/api/v1/file/upload
3. https支持


欢迎提issue~ Good luck 🍀
欢迎提issue~ Good luck 🍀

0 comments on commit 4c3b3fc

Please sign in to comment.