I believe that the real answer is that you cannot. For security reasons, the file path will not be sent by the browser. The file name will be sent, however I do not believe that it is sent without actually downloading.
Closest you can come, afayk to forcefully kill the connection, only when the download starts. This will give you the name of the file with a little actual transferred data, but it does not look like it would be useful for you.
Alternatively, a signed Java applet can bring you closer to the solution you need.
source share