From 4a02383176ee854ccd94f1075c157f76cd908e36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Mon, 27 Aug 2018 12:27:12 +0200 Subject: Moving magic number to constant in team import (#9298) --- api4/team.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'api4') diff --git a/api4/team.go b/api4/team.go index fcc9323ac..2c229dce1 100644 --- a/api4/team.go +++ b/api4/team.go @@ -16,7 +16,8 @@ import ( ) const ( - MAX_ADD_MEMBERS_BATCH = 20 + MAX_ADD_MEMBERS_BATCH = 20 + MAXIMUM_BULK_IMPORT_SIZE = 10 * 1024 * 1024 ) func (api *API) InitTeam() { @@ -641,7 +642,7 @@ func importTeam(c *Context, w http.ResponseWriter, r *http.Request) { return } - if err := r.ParseMultipartForm(10000000); err != nil { + if err := r.ParseMultipartForm(MAXIMUM_BULK_IMPORT_SIZE); err != nil { c.Err = model.NewAppError("importTeam", "api.team.import_team.parse.app_error", nil, err.Error(), http.StatusInternalServerError) return } -- cgit v1.2.3-1-g7c22