Migrate functions to app package (#5106)
* Refactor and move session logic into app package * Refactor email functions into the app package * Refactor password update into app package * Migrate user functions to app package * Move team functions into app package * Migrate channel functions into app package * Pass SiteURL through to app functions * Update based on feedback
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
61b7226533
Коммит
d3a285e64d
@@ -46,8 +46,6 @@ const (
|
||||
RotatedCCW = 6
|
||||
RotatedCCWMirrored = 7
|
||||
RotatedCW = 8
|
||||
|
||||
MaxImageSize = 6048 * 4032 // 24 megapixels, roughly 36MB as a raw image
|
||||
)
|
||||
|
||||
func InitFile() {
|
||||
@@ -162,7 +160,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 {
|
||||
if info.Width*info.Height > model.MaxImageSize {
|
||||
err := model.NewLocAppError("uploadFile", "api.file.upload_file.large_image.app_error", map[string]interface{}{"Filename": filename}, "")
|
||||
err.StatusCode = http.StatusBadRequest
|
||||
return nil, err
|
||||
|
||||
Ссылка в новой задаче
Block a user