This is crazy but I don\'t know how to do this, and because of how common the words are, it\'s hard to find what I need on search engines. I\'m thinking this should be an ea
You can trigger a download with the HTML5 download
attribute.
Download
Where:
path_to_file
is a path that resolves to an URL on the same origin. That means the page and the file must share the same domain, subdomain, protocol (HTTP vs. HTTPS), and port (if specified). Exceptions are blob: and data: (which always work), and file: (which never works).proposed_file_name
is the filename to save to. If it is blank, the browser defaults to the file's name.Documentation: MDN, HTML Standard on downloading, HTML Standard on download, CanIUse