gcz 1 mês atrás
pai
commit
6ee5e043cd
1 arquivos alterados com 1 adições e 1 exclusões
  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 url = window.URL.createObjectURL(blob)
       const link = document.createElement('a')
       const link = document.createElement('a')
       link.href = url
       link.href = url
-      link.download = fileName
+      link.download = fileName||url.split('/').pop()
       link.style.display = 'none'
       link.style.display = 'none'
       document.body.appendChild(link)
       document.body.appendChild(link)
       link.click()
       link.click()