1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00

Remove maxupload global

This commit is contained in:
Daniel Heath 2018-04-28 12:10:47 +10:00
parent ede4d1fba3
commit 9cf0d0e129

View File

@ -28,7 +28,6 @@ var defaultLock string
var debounceTime int var debounceTime int
var diaryMode bool var diaryMode bool
var allowFileUploads bool var allowFileUploads bool
var maxUploadMB uint
var needSitemapUpdate = true var needSitemapUpdate = true
var pathToData string var pathToData string
var log *lumber.ConsoleLogger var log *lumber.ConsoleLogger
@ -107,7 +106,7 @@ func Serve(
func (s Site) Router() *gin.Engine { func (s Site) Router() *gin.Engine {
pathToData = s.PathToData pathToData = s.PathToData
allowFileUploads = s.Fileuploads allowFileUploads = s.Fileuploads
maxUploadMB = s.MaxUploadSize
log = s.Logger log = s.Logger
if log == nil { if log == nil {
log = lumber.NewConsoleLogger(lumber.TRACE) log = lumber.NewConsoleLogger(lumber.TRACE)
@ -527,7 +526,7 @@ func (s Site) handlePageRequest(c *gin.Context) {
"UnixTime": time.Now().Unix(), "UnixTime": time.Now().Unix(),
"ChildPageNames": p.ChildPageNames(), "ChildPageNames": p.ChildPageNames(),
"AllowFileUploads": allowFileUploads, "AllowFileUploads": allowFileUploads,
"MaxUploadMB": maxUploadMB, "MaxUploadMB": s.MaxUploadSize,
}) })
} }