Update error message when uploading too large images (#4535)

Этот коммит содержится в:
Raphaël Bournhonesque
2016-11-15 15:37:52 +01:00
коммит произвёл Christopher Speller
родитель e4f46124b0
Коммит 526c392aad
2 изменённых файлов: 2 добавлений и 2 удалений

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

@@ -171,7 +171,7 @@ func doUploadFile(teamId string, channelId string, userId string, rawFilename st
if info.IsImage() {
// Check dimensions before loading the whole thing into memory later on
if info.Width*info.Height > MaxImageSize {
err := model.NewLocAppError("uploadFile", "api.file.upload_file.large_image.app_error", nil, "")
err := model.NewLocAppError("uploadFile", "api.file.upload_file.large_image.app_error", map[string]interface{}{"Filename": filename}, "")
err.StatusCode = http.StatusBadRequest
return nil, err
}

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

@@ -983,7 +983,7 @@
},
{
"id": "api.file.upload_file.large_image.app_error",
"translation": "Unable to upload image file. File is too large."
"translation": "File above maximum dimensions could not be uploaded: {{.Filename}}"
},
{
"id": "api.file.upload_file.storage.app_error",