鏡像自
https://github.com/go-gitea/gitea
已同步 2025-12-07 13:28:25 +00:00
Refactor packages (func name & UI) (#34773)
1. Use `OpenXxx` instead of `GetXxx` because the returned readers should be correctly closed, and clarify the behaviors of the functions: they increase the download counter 2. Use `packages-content` styles instead of `issue-content`
此提交包含在:
@@ -293,7 +293,7 @@ func DownloadPackageFile(ctx *context.Context) {
|
||||
|
||||
pf := pfs[0]
|
||||
|
||||
s, u, _, err := packages_service.GetPackageFileStream(ctx, pf)
|
||||
s, u, _, err := packages_service.OpenFileForDownload(ctx, pf)
|
||||
if err != nil {
|
||||
apiError(ctx, http.StatusInternalServerError, err)
|
||||
return
|
||||
|
||||
新增問題並參考
封鎖使用者