summaryrefslogtreecommitdiffstats
path: root/api/user.go
diff options
context:
space:
mode:
Diffstat (limited to 'api/user.go')
-rw-r--r--api/user.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/api/user.go b/api/user.go
index ac99bd21b..628e978e9 100644
--- a/api/user.go
+++ b/api/user.go
@@ -1178,13 +1178,13 @@ func uploadProfileImage(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("uploadProfileImage", "api.user.upload_profile_user.too_large.app_error", nil, "")
c.Err.StatusCode = http.StatusRequestEntityTooLarge
return
}
- if err := r.ParseMultipartForm(model.MAX_FILE_SIZE); err != nil {
+ if err := r.ParseMultipartForm(*utils.Cfg.FileSettings.MaxFileSize); err != nil {
c.Err = model.NewLocAppError("uploadProfileImage", "api.user.upload_profile_user.parse.app_error", nil, "")
return
}