aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/packages/nuget/nuget.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/packages/nuget/nuget.go')
-rw-r--r--routers/api/packages/nuget/nuget.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/api/packages/nuget/nuget.go b/routers/api/packages/nuget/nuget.go
index 81ea28bcad..eadf7486a5 100644
--- a/routers/api/packages/nuget/nuget.go
+++ b/routers/api/packages/nuget/nuget.go
@@ -179,7 +179,7 @@ func DownloadPackageFile(ctx *context.Context) {
}
defer s.Close()
- ctx.ServeStream(s, pf.Name)
+ ctx.ServeContent(pf.Name, s, pf.CreatedUnix.AsLocalTime())
}
// UploadPackage creates a new package with the metadata contained in the uploaded nupgk file
@@ -378,7 +378,7 @@ func DownloadSymbolFile(ctx *context.Context) {
return
}
- s, _, err := packages_service.GetPackageFileStream(ctx, pfs[0])
+ s, pf, err := packages_service.GetPackageFileStream(ctx, pfs[0])
if err != nil {
if err == packages_model.ErrPackageNotExist || err == packages_model.ErrPackageFileNotExist {
apiError(ctx, http.StatusNotFound, err)
@@ -389,7 +389,7 @@ func DownloadSymbolFile(ctx *context.Context) {
}
defer s.Close()
- ctx.ServeStream(s, pfs[0].Name)
+ ctx.ServeContent(pf.Name, s, pf.CreatedUnix.AsLocalTime())
}
// DeletePackage hard deletes the package