mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-30 02:48:26 +00:00 
			
		
		
		
	Improve hint when uploading a too large avatar (#26935)
Fix #26390 --------- Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io> Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
		| @@ -146,7 +146,7 @@ func UpdateAvatarSetting(ctx *context.Context, form *forms.AvatarForm, ctxUser * | ||||
| 		defer fr.Close() | ||||
|  | ||||
| 		if form.Avatar.Size > setting.Avatar.MaxFileSize { | ||||
| 			return errors.New(ctx.Tr("settings.uploaded_avatar_is_too_big")) | ||||
| 			return errors.New(ctx.Tr("settings.uploaded_avatar_is_too_big", form.Avatar.Size/1024, setting.Avatar.MaxFileSize/1024)) | ||||
| 		} | ||||
|  | ||||
| 		data, err := io.ReadAll(fr) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user