This commit is contained in:
Amir Raminfar
2021-11-04 15:52:53 -07:00
parent bdead5c55d
commit d9e8cca867

View File

@@ -47,7 +47,7 @@ func (h *handler) downloadLogs(w http.ResponseWriter, r *http.Request) {
now := time.Now()
from := time.Unix(container.Created, 0)
w.Header().Set("Content-Disposition", fmt.Sprintf("attachment; filename=%v.log.gz", container.ID))
w.Header().Set("Content-Disposition", fmt.Sprintf("attachment; filename=%s-%s.log.gz", container.Name, now.Format("2006-01-02T15-04-05")))
w.Header().Set("Content-Type", "application/gzip")
zw := gzip.NewWriter(w)
defer zw.Close()