Max_File_Size setting in System Console > File Settings (#3070)

Этот коммит содержится в:
Thomas Balthazar
2016-05-24 15:07:42 +02:00
коммит произвёл Harrison Healey
родитель 8e5c318590
Коммит 7e2b539de4
9 изменённых файлов: 48 добавлений и 16 удалений

Просмотреть файл

@@ -5,12 +5,13 @@ package api
import (
"bytes"
l4g "github.com/alecthomas/log4go"
"github.com/mattermost/platform/model"
"github.com/mattermost/platform/utils"
"io"
"net/http"
"strings"
l4g "github.com/alecthomas/log4go"
"github.com/mattermost/platform/model"
"github.com/mattermost/platform/utils"
)
const (
@@ -48,7 +49,7 @@ func LoadLicense() {
func addLicense(c *Context, w http.ResponseWriter, r *http.Request) {
c.LogAudit("attempt")
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