mirror of
https://github.com/nezhahq/nezha.git
synced 2025-02-02 01:28:13 -05:00
12 lines
464 B
Diff
12 lines
464 B
Diff
@@ -1073,6 +1073,10 @@
|
|
// File writes the specified file into the body stream in an efficient way.
|
|
func (c *Context) File(filepath string) {
|
|
http.ServeFile(c.Writer, c.Request, filepath)
|
|
+}
|
|
+
|
|
+func (c *Context) FileWithCustomStatusCode(filepath string, statusCode int) {
|
|
+ http.ServeFileWithCustomStatusCode(c.Writer, c.Request, filepath, statusCode)
|
|
}
|
|
|
|
// FileFromFS writes the specified file from http.FileSystem into the body stream in an efficient way.
|