slene %!s(int64=11) %!d(string=hai) anos
pai
achega
417d861be6
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      routers/repo/repo.go

+ 1 - 1
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")
 	}