From 28977d618214329ded171328d00de8c3e1465ff7 Mon Sep 17 00:00:00 2001 From: toddlerya Date: Mon, 5 Nov 2018 23:21:44 +0800 Subject: [PATCH] fix https://github.com/filebrowser/filebrowser/issues/556 --- lib/file.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/file.go b/lib/file.go index 304cd96c..6960ef4b 100644 --- a/lib/file.go +++ b/lib/file.go @@ -268,7 +268,7 @@ func (i *File) GetFileType(checkContent bool) error { End: // If the file type is text, save its content. - if i.Type == "text" && i.Size < 10240 { // Avoiding files that are too large causes browsers to crash + if i.Type == "text" && i.Size <= 10240 { // Avoiding files that are too large causes browsers to crash if len(content) == 0 { content, err = ioutil.ReadFile(i.Path) if err != nil {