mirror of
https://github.com/gmemstr/sliproad.git
synced 2024-09-20 00:21:15 +01:00
Use common readandservefile function (can handle large files)
This commit is contained in:
parent
053148e4b6
commit
f9023d0c4d
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue