Skip to content

Commit 23de796

Browse files
Create DownloadFile.js
1 parent 0455b11 commit 23de796

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

html/DownloadFile.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
function download(fileUrl, fileName) {
2+
var a = document.createElement("a");
3+
a.href = fileUrl;
4+
a.setAttribute("download", fileName);
5+
a.click();
6+
}

0 commit comments

Comments
 (0)