List broken files but dont serve them

This commit is contained in:
Ben Adrian Sarmiento
2024-06-26 10:44:16 +02:00
parent e4650a0f0f
commit d5e3665a53
8 changed files with 12 additions and 19 deletions

View File

@@ -32,6 +32,7 @@ func CheckFile(directory, torrentName, fileName string, w http.ResponseWriter, r
http.Error(w, "File not found", http.StatusNotFound)
return
}
contentType := getContentMimeType(fileName)
contentLength := fmt.Sprintf("%d", file.Bytes)
lastModified := file.Ended