chore: replace all cn comments to en version by volc api (#313)

This commit is contained in:
tecvan
2025-07-31 15:18:11 +08:00
committed by GitHub
parent 91d6cdb430
commit 5abc63fba6
254 changed files with 5899 additions and 5844 deletions

View File

@@ -159,7 +159,7 @@ func UserUpdateAvatar(ctx context.Context, c *app.RequestContext) {
var err error
var req passport.UserUpdateAvatarRequest
// 获取上传的文件
// Get the uploaded file
file, err := c.FormFile("avatar")
if err != nil {
logs.CtxErrorf(ctx, "Get Avatar Fail failed, err=%v", err)
@@ -167,13 +167,13 @@ func UserUpdateAvatar(ctx context.Context, c *app.RequestContext) {
return
}
// 检查文件类型
// Check file type
if !strings.HasPrefix(file.Header.Get("Content-Type"), "image/") {
invalidParamRequestResponse(c, "invalid file type, only image allowed")
return
}
// 读取文件内容
// Read file content
src, err := file.Open()
if err != nil {
internalServerErrorResponse(ctx, c, err)