Add UploadFileSafe().

This commit is contained in:
Gucheng Wang
2021-11-20 16:21:15 +08:00
parent 9eb09b7db0
commit 95600414d9
5 changed files with 27 additions and 4 deletions

View File

@ -246,7 +246,7 @@ func UpdateUser(id string, user *User) bool {
user.UpdateUserHash()
if user.Avatar != oldUser.Avatar && user.Avatar != "" {
if user.Avatar != oldUser.Avatar && user.Avatar != "" && user.PermanentAvatar != "*" {
user.PermanentAvatar = getPermanentAvatarUrl(user.Owner, user.Name, user.Avatar)
}