ikraamkb commited on
Commit
05bcdca
·
verified ·
1 Parent(s): a7d9e72

Update static/appS.js

Browse files
Files changed (1) hide show
  1. static/appS.js +14 -12
static/appS.js CHANGED
@@ -629,19 +629,21 @@ document.addEventListener('DOMContentLoaded', () => {
629
  iconRow.appendChild(icon);
630
  }
631
 
632
- if (fileName) {
633
- const downloadLink = document.createElement("a");
634
- downloadLink.href = fileName;
635
- downloadLink.download = "summary.pdf";
636
- downloadLink.target = "_blank";
637
-
638
- const downloadIcon = document.createElement("i");
639
- downloadIcon.className = "fa-solid fa-file-arrow-down";
640
- downloadIcon.style.cursor = "pointer";
 
 
 
 
 
641
 
642
- downloadLink.appendChild(downloadIcon);
643
- iconRow.appendChild(downloadLink);
644
- }
645
 
646
  message.appendChild(iconRow);
647
  }
 
629
  iconRow.appendChild(icon);
630
  }
631
 
632
+ if (fileName) {
633
+ const downloadLink = document.createElement('a');
634
+ downloadLink.href = `/files/${fileName.split('/').pop()}`;
635
+ downloadLink.target = "_blank";
636
+ downloadLink.download = fileName.split('/').pop();
637
+
638
+ const downloadIcon = document.createElement("i");
639
+ downloadIcon.className = "fa-solid fa-file-arrow-down";
640
+ downloadIcon.style.fontSize = "18px";
641
+ downloadIcon.style.cursor = "pointer";
642
+
643
+ downloadLink.appendChild(downloadIcon);
644
+ iconContainer.appendChild(downloadLink);
645
+ }
646
 
 
 
 
647
 
648
  message.appendChild(iconRow);
649
  }