fix: correct avatar URL generation to resolve 404 errors (#4839)

This commit is contained in:
Amar Singh Rathour authored and GitHub committed 2025-07-09 21:05:52 +08:00
1 parent e803d7bc0f
commit b779dd2e54
1 file changed
+1 -1
+1 -1
View File
@@ -785,7 +785,7 @@ func convertUserFromStore(user *store.User) *v1pb.User {
// Check if avatar url is base64 format.
_, _, err := extractImageInfo(user.AvatarURL)
if err == nil {
userpb.AvatarUrl = fmt.Sprintf("/file/%s/avatar", userpb.Name)
userpb.AvatarUrl = fmt.Sprintf("/api/v1/%s/avatar", userpb.Name)
} else {
userpb.AvatarUrl = user.AvatarURL
}