diff options
Diffstat (limited to 'app/user.go')
-rw-r--r-- | app/user.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/user.go b/app/user.go index 493b391ae..64e49e293 100644 --- a/app/user.go +++ b/app/user.go @@ -778,7 +778,10 @@ func (a *App) SetProfileImage(userId string, imageData *multipart.FileHeader) *m return model.NewAppError("SetProfileImage", "api.user.upload_profile_user.open.app_error", nil, err.Error(), http.StatusBadRequest) } defer file.Close() + return a.SetProfileImageFromFile(userId, file) +} +func (a *App) SetProfileImageFromFile(userId string, file multipart.File) *model.AppError { // Decode image config first to check dimensions before loading the whole thing into memory later on config, _, err := image.DecodeConfig(file) if err != nil { |