Last active
May 10, 2022 14:23
-
-
Save gusribeiro/319da84819401532b672be79f6762adc to your computer and use it in GitHub Desktop.
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 bytes = new Uint8Array(api_result); | |
const blob = new Blob([bytes], { | |
type: 'application/pdf', | |
}); | |
const link = document.createElement('a'); | |
link.href = URL.createObjectURL(blob); | |
link.download = "myFileName.pdf"; | |
link.click(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment