code refactoring

This commit is contained in:
2024-08-20 20:29:32 +02:00
parent c51f320a6f
commit 8f2d9eaf6e
6 changed files with 20 additions and 17 deletions

View File

@@ -158,7 +158,6 @@ func SendFile(w http.ResponseWriter, r *http.Request) {
root := config.Instance().DownloadPath
// TODO: further path / file validations
if strings.Contains(filepath.Dir(filename), root) {
http.ServeFile(w, r, filename)
return