diff options
author | Thomas Balthazar <tbalthazar@users.noreply.github.com> | 2016-05-24 15:07:42 +0200 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2016-05-24 09:07:42 -0400 |
commit | 7e2b539de484ac4f2e97eafce6b8d63ffa2caf13 (patch) | |
tree | e85b742e695c611958f249a4e39d0e6370c1f9b0 /api/file.go | |
parent | 8e5c31859012516afcfc28eddbb644a4c96fe9d3 (diff) | |
download | chat-7e2b539de484ac4f2e97eafce6b8d63ffa2caf13.tar.gz chat-7e2b539de484ac4f2e97eafce6b8d63ffa2caf13.tar.bz2 chat-7e2b539de484ac4f2e97eafce6b8d63ffa2caf13.zip |
Max_File_Size setting in System Console > File Settings (#3070)
Diffstat (limited to 'api/file.go')
-rw-r--r-- | api/file.go | 4 |
1 files changed, 2 insertions, 2 deletions
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 |