From 7e2b539de484ac4f2e97eafce6b8d63ffa2caf13 Mon Sep 17 00:00:00 2001 From: Thomas Balthazar Date: Tue, 24 May 2016 15:07:42 +0200 Subject: Max_File_Size setting in System Console > File Settings (#3070) --- api/file.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'api/file.go') diff --git a/api/file.go b/api/file.go index f4d1e0005..e29bb072a 100644 --- a/api/file.go +++ b/api/file.go @@ -77,13 +77,13 @@ func uploadFile(c *Context, w http.ResponseWriter, r *http.Request) { return } - if r.ContentLength > model.MAX_FILE_SIZE { + if r.ContentLength > *utils.Cfg.FileSettings.MaxFileSize { c.Err = model.NewLocAppError("uploadFile", "api.file.upload_file.too_large.app_error", nil, "") c.Err.StatusCode = http.StatusRequestEntityTooLarge return } - err := r.ParseMultipartForm(model.MAX_FILE_SIZE) + err := r.ParseMultipartForm(*utils.Cfg.FileSettings.MaxFileSize) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError) return -- cgit v1.2.3-1-g7c22