Invalidate the avatar cache when uploading a new one

This commit is contained in:
kolaente 2020-08-02 15:19:32 +02:00
parent b379016d1d
commit dd55003a71
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 2 additions and 0 deletions

View File

@ -149,6 +149,8 @@ func UploadAvatar(c echo.Context) (err error) {
return handler.HandleHTTPError(err, c)
}
upload.InvalidateCache(u)
// Save the file
f, err := files.CreateWithMime(buf, file.Filename, uint64(file.Size), u, "image/png")
if err != nil {