Simplifies c.File()
This commit is contained in:
+1
-4
@@ -375,10 +375,7 @@ func (c *Context) Data(code int, contentType string, data []byte) {
|
||||
|
||||
// Writes the specified file into the body stream
|
||||
func (c *Context) File(filepath string) {
|
||||
c.Render(-1, render.File{
|
||||
Path: filepath,
|
||||
Request: c.Request,
|
||||
})
|
||||
http.ServeFile(c.Writer, c.Request, filepath)
|
||||
}
|
||||
|
||||
func (c *Context) SSEvent(name string, message interface{}) {
|
||||
|
||||
Reference in New Issue
Block a user