Skip to content Skip to sidebar Skip to footer

A Web-page That Would Provide A User To Download A Certain File From It, But Would Not Disclose The Location Of That File - Is It Possible At All?

(I am sorry if my question is not in the right place. (I've been thinking for awhile and came up to the conclusion that this one is the best place for my question) Is it possible t

Solution 1:

The HTML page would provide a link to a server side script passing a filename or other unique moniker:

<ahref="fetch.cgi?file=xxyyzz">Download Now</a>

The script would read the identifier, derive a full path from it, load the file and write it back with the appropriate headers/mime type causing the browser to prompt the user with the normal download dialog.

The only location data available to the user would be the link to the script - which would - unless you add some security - serve back the file just as if it were a standard url pointing to a file.

(PHP Example)

Solution 2:

With pure html, no. But with a serverside script (php, c#, vb, perl, or other) yes. You would stream the file to user. In that case just the serverside script has access to the origin files

Post a Comment for "A Web-page That Would Provide A User To Download A Certain File From It, But Would Not Disclose The Location Of That File - Is It Possible At All?"