diff options
| author | X3STeNLiTE <xestenlite@gmail.com> | 2020-04-08 22:53:54 +0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-09 01:53:54 +1000 |
| commit | 20bf93c86d7453d4ac1bdaf6bd2679f49d5951e9 (patch) | |
| tree | 083c965025efc01bc864b69bc3f47c0828daf85a /app/app.go | |
| parent | cb8d61538dac417f3534558e864e9982616c2010 (diff) | |
fix hard-coded frontend max_upload_size validation (#20)
Diffstat (limited to 'app/app.go')
| -rw-r--r-- | app/app.go | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -204,7 +204,9 @@ func (a *App) indexHandler(w http.ResponseWriter, r *http.Request) { // HTTP handler for /upload func (a *App) uploadHandler(w http.ResponseWriter, r *http.Request) { if r.Method == "GET" { - ctx := &struct{}{} + ctx := map[string]interface{}{ + "MAX_UPLOAD_SIZE": a.Config.Server.MaxUploadSize, + } a.render("upload", w, ctx) } else if r.Method == "POST" { r.ParseMultipartForm(a.Config.Server.MaxUploadSize) |
