1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-20 03:17:04 +00:00

add a DirListRich helper to make the file listing a bit more appealing than its default

Former-commit-id: 1d8338cddac0856be1c9f1e7b6d8d400bee71bef
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-07-05 23:27:32 +03:00
parent bdfe8de66d
commit 16a6372cc9
3 changed files with 186 additions and 16 deletions

View File

@@ -31,6 +31,7 @@ func main() {
app.HandleDir("/files", "./uploads", iris.DirOptions{
Gzip: true,
ShowList: true,
DirList: iris.DirListRich,
})
app.Listen(":8080")
@@ -49,7 +50,7 @@ func uploadView(ctx iris.Context) {
ctx.View("upload.html", token)
}
const maxSize = 10 * iris.MB
const maxSize = 1 * iris.GB
func upload(ctx iris.Context) {
ctx.SetMaxRequestBodySize(maxSize)