gcz 3 weeks ago
parent
commit
6ee5e043cd
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/utils/index.js

+ 1 - 1
src/utils/index.js

@@ -22,7 +22,7 @@ export const downloadFile = (url, fileName) => {
       const url = window.URL.createObjectURL(blob)
       const link = document.createElement('a')
       link.href = url
-      link.download = fileName
+      link.download = fileName||url.split('/').pop()
       link.style.display = 'none'
       document.body.appendChild(link)
       link.click()