Compare commits

..

No commits in common. "13fc02b8ba3eaa6950ee039aa8cb16d2b971551e" and "8f137abf30b6d658e02050a35dd5f19ec2b70efe" have entirely different histories.

View File

@ -373,7 +373,6 @@ func (cr ChatHandler) Upload(c *gin.Context) {
service.ErrWithCode(c, code)
return
}
fmt.Printf("chatUser is %#v\n", chatUser)
//获取文件对象
file, err := c.FormFile("file")
if err != nil {
@ -428,7 +427,7 @@ func (cr ChatHandler) Upload(c *gin.Context) {
defer tmp.Close()
fileBuffer := bytes.NewBuffer(fileContent)
var bosUrl string
bosUrl, err = upload.UploadWithBuffer(fileBuffer, fmt.Sprintf("fiee/%d/%v%v", chatUser.ID, filename, fileExt))
bosUrl, err = upload.UploadWithBuffer(fileBuffer, fmt.Sprintf("%d/%v%v", chatUser.ID, filename, fileExt))
if err != nil {
service.Error(c, err)
return