fix(packages): use file names for generic web downloads (#37514) (#37520)

Backport #37514 

Fixes #37511.

Signed-off-by: cyphercodes <cyphercodes@users.noreply.github.com>
Co-authored-by: Rayan Salhab <r.salhab@aiyexpertsolutions.com>
Co-authored-by: cyphercodes <cyphercodes@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Giteabot
2026-05-03 11:24:02 -07:00
committed by GitHub
parent dd78d87dcd
commit eeb4d8ffa2
3 changed files with 29 additions and 2 deletions
+5 -1
View File
@@ -566,7 +566,11 @@ func DownloadPackageFile(ctx *context.Context) {
return
}
packages_helper.ServePackageFile(ctx, s, u, pf)
packages_helper.ServePackageFile(ctx, s, u, pf, httplib.ServeHeaderOptions{
Filename: pf.Name,
LastModified: pf.CreatedUnix.AsLocalTime(),
ContentDisposition: httplib.ContentDispositionAttachment,
})
}
// ActionPackageTerraformLock locks a terraform state