Improve readability.
This commit is contained in:
1 parent
45a6fd563f
commit
ac88aab3eb
1 file changed
+1
-1
+1
-1
@@ -108,7 +108,7 @@ func downloadFileHandler(c *fm.Context, w http.ResponseWriter, r *http.Request)
|
|||||||
if r.URL.Query().Get("inline") == "true" {
|
if r.URL.Query().Get("inline") == "true" {
|
||||||
w.Header().Set("Content-Disposition", "inline")
|
w.Header().Set("Content-Disposition", "inline")
|
||||||
} else {
|
} else {
|
||||||
w.Header().Set("Content-Disposition", "attachment; filename=\""+c.File.Name+"\"")
|
w.Header().Set("Content-Disposition", `attachment; filename="`+c.File.Name+`"`)
|
||||||
}
|
}
|
||||||
|
|
||||||
http.ServeFile(w, r, c.File.Path)
|
http.ServeFile(w, r, c.File.Path)
|
||||||
|
|||||||
Reference in new issue
Block a user