Match more text mimetypes

This commit is contained in:
andreimarcu 2015-10-28 15:55:56 -04:00
parent 294e8d8be2
commit 07aaad2cd8
1 changed files with 1 additions and 1 deletions

View File

@ -77,7 +77,7 @@ func fileDisplayHandler(c web.C, w http.ResponseWriter, r *http.Request) {
} else if metadata.Mimetype == "application/pdf" { } else if metadata.Mimetype == "application/pdf" {
tpl = Templates["display/pdf.html"] tpl = Templates["display/pdf.html"]
} else if metadata.Mimetype == "text/plain" || supportedBinExtension(extension) { } else if metadata.Mimetype[:5] == "text/" || supportedBinExtension(extension) {
if metadata.Size < maxDisplayFileSizeBytes { if metadata.Size < maxDisplayFileSizeBytes {
bytes, err := ioutil.ReadFile(filePath) bytes, err := ioutil.ReadFile(filePath)
if err == nil { if err == nil {