Mercurial > gemma
comparison client/src/components/stretches/Stretches.vue @ 4393:cdd332dbebbf
Fixed date in filename for stretch download.
author | Sascha Wilde <wilde@intevation.de> |
---|---|
date | Thu, 12 Sep 2019 20:24:03 +0200 |
parents | 024b16a1c253 |
children | 2e47b32a389d |
comparison
equal
deleted
inserted
replaced
4392:024b16a1c253 | 4393:cdd332dbebbf |
---|---|
150 } | 150 } |
151 }).then(response => { | 151 }).then(response => { |
152 const link = document.createElement("a"); | 152 const link = document.createElement("a"); |
153 const now = new Date(); | 153 const now = new Date(); |
154 link.href = window.URL.createObjectURL(response.data); | 154 link.href = window.URL.createObjectURL(response.data); |
155 link.download = `${name}-${format(now, "YYYY-mm-DD")}.zip`; | 155 link.download = `${name}-${format(now, "YYYY-MM-DD")}.zip`; |
156 document.body.appendChild(link); | 156 document.body.appendChild(link); |
157 link.click(); | 157 link.click(); |
158 document.body.removeChild(link); | 158 document.body.removeChild(link); |
159 }); | 159 }); |
160 }, | 160 }, |