0

I want a user to be able to download a file after entering their credentials on the webpage.

Currently I'm able to allow them download the file only if their browser has access to the hosting servers file systems. I saw this How to trigger a file download when clicking an HTML button or JavaScript.

This is what I'm doing currently:

<a href="C:\Users\me\Downloads\" download="proposed_file_name">Download</a>

Excuse my naivety. My question is this: how do I change the path to file in:

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

such that the user can directly download to their local machine when they don't have access to the hosting servers.

Michael Okelola
  • 783
  • 5
  • 17

0 Answers0