close file when done reading

This commit is contained in:
Mahmood Ali
2020-08-24 20:22:42 -04:00
parent b84bd95b6a
commit 3dcf60a61e

View File

@@ -430,6 +430,7 @@ func detectContentType(fileInfo os.FileInfo, path string) string {
if err == nil {
contentType = http.DetectContentType(fileBytes)
}
f.Close()
}
}
// Special case json files