[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
Этот коммит содержится в:
Jesús Espino
2018-01-11 16:57:47 +01:00
коммит произвёл Joram Wilander
родитель 0a9200c35d
Коммит 6990d052d5
125 изменённых файлов: 9686 добавлений и 58 удалений

Просмотреть файл

@@ -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 {