fmt file.go && fix https://github.com/filebrowser/filebrowser/issues/556
This commit is contained in:
parent
3eb2806f29
commit
0be9d74d16
@ -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 {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user