diff --git a/files/files.go b/files/files.go index 366b074..6da9da9 100644 --- a/files/files.go +++ b/files/files.go @@ -112,9 +112,8 @@ func ViewFile(tier string) common.Handler { if err != nil { panic(err) } - file, err := ioutil.ReadFile(path) - w.Write(file) + common.ReadAndServeFile(path, w) return nil }