Created
July 10, 2020 00:00
-
-
Save Oluwa-nifemi/153512bc79aab093d9f7cf7e8842f8f2 to your computer and use it in GitHub Desktop.
Download File React
This file contains 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
const link = document.createElement('a'); | |
link.href = "file url"; | |
link.download = 'file name'; | |
document.body.appendChild(link); | |
link.click(); | |
link.remove(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment