[XYZ-6] Add sampledata platform command (#8027)
* Add fake dependency * [XYZ-6] Add sampledata platform command * Creating EMOJI_NAME_MAX_LENGTH as a constant and using it where needed
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
0a9200c35d
Коммит
6990d052d5
@@ -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 {
|
||||
|
||||
Ссылка в новой задаче
Block a user