mirror of
https://github.com/Mrs4s/MiraiGo.git
synced 2025-05-07 20:45:53 +08:00
fix head upload.
This commit is contained in:
parent
5f8d4f22ae
commit
a6139bfb2b
@ -93,6 +93,10 @@ func (c *QQClient) uploadGroupHeadPortrait(groupCode int64, img []byte) error {
|
||||
req, err := http.NewRequest("POST", url, bytes.NewReader(img))
|
||||
req.Header["User-Agent"] = []string{"Dalvik/2.1.0 (Linux; U; Android 7.1.2; PCRT00 Build/N2G48H)"}
|
||||
req.Header["Content-Type"] = []string{"multipart/form-data;boundary=****"}
|
||||
_, err = http.DefaultClient.Do(req)
|
||||
return err
|
||||
}
|
||||
rsp, err := http.DefaultClient.Do(req)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
rsp.Body.Close()
|
||||
return nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user