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

Fixes #37511.

Serve Generic package web asset downloads with the stored package filename

Signed-off-by: cyphercodes <cyphercodes@users.noreply.github.com>
Co-authored-by: cyphercodes <cyphercodes@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Rayan Salhab
2026-05-03 10:19:21 +03:00
committed by GitHub
parent 0385e4783e
commit 7016f7b37f
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