Skip to content

Instantly share code, notes, and snippets.

@anthonybudd
Last active February 19, 2023 22:03
Show Gist options
  • Save anthonybudd/14ffd992feb600527bc0383d1ec56e78 to your computer and use it in GitHub Desktop.
Save anthonybudd/14ffd992feb600527bc0383d1ec56e78 to your computer and use it in GitHub Desktop.
const { data } = await axios.post(`/upload`, { });
const blob = new Blob([data], { type: 'application/pdf' });
const a = document.createElement('a');
a.href = window.URL.createObjectURL(blob);
a.download = "resume-with-metadata.pdf";
a.target = '_self';
document.body.appendChild(a);
a.click();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment