Merge branch 'chat' into dev
This commit is contained in:
commit
13fc02b8ba
@ -373,6 +373,7 @@ 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 {
|
||||
@ -427,7 +428,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("%d/%v%v", chatUser.ID, filename, fileExt))
|
||||
bosUrl, err = upload.UploadWithBuffer(fileBuffer, fmt.Sprintf("fiee/%d/%v%v", chatUser.ID, filename, fileExt))
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user