fix upload file

This commit is contained in:
eatMoreApple 2021-06-15 20:40:18 +08:00
parent 7d2fd2fe33
commit 7d037f9e03
2 changed files with 21 additions and 0 deletions

View File

@ -383,6 +383,11 @@ func (c *Client) WebWxUploadMediaByChunk(file *os.File, request *BaseRequest, in
if chunks > 1 {
content["chunks"] = strconv.FormatInt(chunks, 10)
}
if _, err = file.Seek(0, 0); err != nil {
return nil, err
}
// 分块上传
for chunk := 0; int64(chunk) < chunks; chunk++ {

View File

@ -284,6 +284,22 @@ dispatcher.OnVoice(handlers ...MessageContextHandler)
###### 注册消息类型为`好友添加`的处理函数
```go
dispatcher.OnFriendAdd(handlers ...MessageContextHandler)
```
###### 注册消息类型为`Card`的处理函数
```go
dispatcher.OnCard(handlers ...MessageContextHandler)
```
### 登陆用户