Last active
June 16, 2020 03:59
-
-
Save railsstudent/390bafc8d404678f9934b5719e5cbe75 to your computer and use it in GitHub Desktop.
Use FileSaver to open File object
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
openFile(name: string) { | |
if (this.formData[name]) { | |
const file = this.formData[name] as File | |
if (file) { | |
const { name: filename } = file | |
saveAs(file, filename) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment