diff options
Diffstat (limited to 'routers')
-rw-r--r-- | routers/repo/repo.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/repo/repo.go b/routers/repo/repo.go index 4573a3e4..8c686bc3 100644 --- a/routers/repo/repo.go +++ b/routers/repo/repo.go @@ -243,7 +243,7 @@ func SingleDownload(ctx *middleware.Context, params martini.Params) { contentType, isTextFile := base.IsTextFile(data) _, isImageFile := base.IsImageFile(data) ctx.Res.Header().Set("Content-Type", contentType) - if !isTextFile { + if !isTextFile && !isImageFile { ctx.Res.Header().Set("Content-Disposition", "attachment; filename="+filepath.Base(treename)) ctx.Res.Header().Set("Content-Transfer-Encoding", "binary") } |