Created
November 6, 2013 03:33
-
-
Save phamquocbuu/7330466 to your computer and use it in GitHub Desktop.
JS Save a file from a URL with JavaScript http://ausdemmaschinenraum.wordpress.com/2012/12/06/how-to-save-a-file-from-a-url-with-javascript/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var a = document.createElement('a'); | |
a.download = filename; // Set the file name. | |
a.style.display = 'none'; | |
document.body.appendChild(a); | |
a.click(); | |
delete a; |
Hi,
how can i get the filename that was used, when the file was uploaded onto the server.
It does not work.
you are missing a.href = "URL to download"
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this http://www.muazkhan.com/2012/10/save-files-on-disk-using-javascript-or.html
This may help you!