Skip to content

Commit f4b0811

Browse files
committed
use http.ServeContent
1 parent db619c3 commit f4b0811

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

modules/actions/artifacts.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package actions
22

33
import (
4-
"io"
54
"net/http"
65

76
actions_model "code.gitea.io/gitea/models/actions"
@@ -33,7 +32,7 @@ func DownloadArtifactV4Fallback(ctx *context.Base, art *actions_model.ActionArti
3332
return err
3433
}
3534
defer f.Close()
36-
_, _ = io.Copy(ctx.Resp, f)
35+
http.ServeContent(ctx.Resp, ctx.Req, art.ArtifactName+".zip", art.CreatedUnix.AsLocalTime(), f)
3736
return nil
3837
}
3938

0 commit comments

Comments
 (0)