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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user