Improve readability.
parent
45a6fd563f
commit
ac88aab3eb
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue