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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user