aboutsummaryrefslogtreecommitdiff
path: root/routers/repo/download.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/repo/download.go')
-rw-r--r--routers/repo/download.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/repo/download.go b/routers/repo/download.go
index 95a0224e..a1ad3eff 100644
--- a/routers/repo/download.go
+++ b/routers/repo/download.go
@@ -10,7 +10,7 @@ import (
"github.com/gogits/git-module"
- "github.com/gogits/gogs/pkg/base"
+ "github.com/gogits/gogs/pkg/tool"
"github.com/gogits/gogs/pkg/context"
"github.com/gogits/gogs/pkg/setting"
)
@@ -22,8 +22,8 @@ func ServeData(ctx *context.Context, name string, reader io.Reader) error {
buf = buf[:n]
}
- if !base.IsTextFile(buf) {
- if !base.IsImageFile(buf) {
+ if !tool.IsTextFile(buf) {
+ if !tool.IsImageFile(buf) {
ctx.Resp.Header().Set("Content-Disposition", "attachment; filename=\""+name+"\"")
ctx.Resp.Header().Set("Content-Transfer-Encoding", "binary")
}