Last updated 4 years ago
Slide supports wide range of files support
// path and dir name app.ServerDir("/static", "static")
// single file app.ServeFile("/js", "static/login.js")
// Downloading file app.Get("/download", func(ctx *slide.Ctx) error { return ctx.SendAttachment("static/login.js", "login.js") })
// uploading file app.Post("/upload", func(ctx *slide.Ctx) error { return ctx.UploadFile("static/login.js", "login.js") })
app.Get("/servefile", func(ctx *slide.Ctx) error { return ctx.ServeFile("static/index.html") })