Tanmay Goyal Tanmay Goyal - 1 year ago 75
HTML Question

Open A File Via Html Button

I am looking for a way to open a file when user clicks on the open button on my website.

Basically, I want to define the path to that specific file that I want the html button to open.

Answer Source

I have read about it in another post. Try using this:

<a href="path_to_file" download="proposed_file_name">Download</a>

Where :

path_to_file is either an absolute or relative path, proposed_file_name the filename to save to (can be blank, then defaults to the actual filename).

Hope it helps

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download