From e01ea1d9c2f07031f72bf6886dff40e8af44ab6a Mon Sep 17 00:00:00 2001 From: jjxu <428192774@qq.com> Date: Sat, 14 Jun 2025 15:04:51 +0800 Subject: [PATCH] Update handler.go --- pkg/service/asChat/handler.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/service/asChat/handler.go b/pkg/service/asChat/handler.go index f2a1b80..ac0118a 100644 --- a/pkg/service/asChat/handler.go +++ b/pkg/service/asChat/handler.go @@ -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