From ff9e17b11ec8e16bf2daa4823848ffacb492236d Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Wed, 14 Oct 2020 16:51:36 -0500 Subject: [PATCH] add hash to download filename --- web/repo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/repo.go b/web/repo.go index 6f6f199..7aa1c6c 100644 --- a/web/repo.go +++ b/web/repo.go @@ -94,7 +94,7 @@ func (web *Web) mapZip(c *gin.Context) { files := tree.Files() c.Writer.Header().Set("Content-type", "application/octet-stream") - c.Writer.Header().Set("Content-Disposition", fmt.Sprintf("attachment; filename=%s.zip", mapId)) + c.Writer.Header().Set("Content-Disposition", fmt.Sprintf("attachment; filename=%s-%s.zip", mapId, hash)) c.Stream(func(w io.Writer) bool { ar := zip.NewWriter(w) for {