fix: broken file name extension while downloading response

This commit is contained in:
Liyas Thomas
2021-01-04 07:25:03 +05:30
parent 025ead4fa3
commit ffa9210286
6 changed files with 7 additions and 8 deletions

View File

@@ -103,7 +103,7 @@ export default {
const url = URL.createObjectURL(file)
a.href = url
// TODO get uri from meta
a.download = `response on ${Date()}`.replace(/\./g, "[dot]")
a.download = `${url.split("/").pop().split("#")[0].split("?")[0]}`
document.body.appendChild(a)
a.click()
this.$refs.downloadResponse.innerHTML = this.doneButton