From 838f4f40884f4bb1bb150fdde593066e3549492f Mon Sep 17 00:00:00 2001 From: bytedream Date: Mon, 5 May 2025 18:43:43 +0200 Subject: [PATCH] Fix only text/* being viewable in web UI --- routers/web/repo/editor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/web/repo/editor.go b/routers/web/repo/editor.go index 514eb0ebfe024..03e5b830a0884 100644 --- a/routers/web/repo/editor.go +++ b/routers/web/repo/editor.go @@ -165,7 +165,7 @@ func editFile(ctx *context.Context, isNewFile bool) { ctx.Data["FileSize"] = blob.Size() // Only some file types are editable online as text. - if !fInfo.isTextFile || fInfo.isLFSFile { + if !fInfo.st.IsRepresentableAsText() || fInfo.isLFSFile { ctx.NotFound(nil) return }