PDA

View Full Version : Creating a link to a downloadable zip file


hans100
08-11-2006, 07:44 AM
Been a :confused: novice Ive searched around and read tutorials yet all the jargon and knowledge assumptions just create a deeper state of :confused:
I know to use the <a href="URL"></a> if I want to link to a page but the problem I have is if I have a file that needs to be pointed to as an address (thereby a link) for download purposes.Problem is the files reside in my ftp section/address after uploading.

Although i can create a ftp link, the problem is that the password id is then required! So how do I offer an address where on clicking the linked address the file would automatically download.?
In reality,I would have 50 odd zipped pdf documents uploaded to to my ftp file (where else?) and once any one is requested, it would only require me to either drag it or C&P it to a place/position/location that I could then describe as a link address for download and consequently email this to a respondent.

The host server is godaddy.com whom I understand uses ASP language! (not sure if this server language effects the ability although I hope its just a html action)
i trust this is a straight forward query for the pro's and I TIA for the solution in what I should be doing~

BonRouge
08-11-2006, 09:25 AM
Why don't you just put those files in your regular site directory?

VIPStephan
08-11-2006, 09:50 AM
Yeah, if you put your zip file(s) into your root directory (or where all the other HTML files are) and link to it like this:
<a href="/file.zip">Download</a>
a prompt will ask us to store or execute this file automatically. There's not rocket science behind it.

hans100
08-11-2006, 01:29 PM
.....could hide the file location and/or locate the pdf files in their respective subject folders?
Thx guys, in your example I would create a html page with the text "download file"- create a link to the particular .zip file in the root folder.
I copy this path the URL for the download and subsequently email to the respondent. ...wish i could leave it as such but as u know ....!

I noted this similar query within this forum but there was no help offered from that point.... http://www.codingforums.com/showpost.php?p=146376&postcount=7

I'm not sure but I dont believe I can use PHP script due to the fact that I am on a windows server where ASP code is used. (could be wrong?!)

Nonetheless,the method as you described would be a breeze but present & growing quantity of pdf ZIP files located in that ftp rootfolder, they are very easily accessable to anyone by simply entering the www.address.com/whatever_file_u_want.zip.
I would have NO control whatsoever!
Maybe an additional script could be encoded within that initial script pointing to a file that on the download action, the exact path is not decribed in the url . THATS MY GOAL!
Ive seen downloads and files with the asp extension .Is this not the masking process?

If using script proves too complicated is there possibly a smart encryption or accessability program to protect access or download if I should store all the files in the root folder?
I know the winzip has got a password option but am told its useless!

Well I have progressed at least ....but still require the key to allow half decent security and also organization(ie at least 6 subject folders ) THX again!

BonRouge
08-11-2006, 04:32 PM
The organization's easy. As you said, just use separate sub-directories for each subject.
As far as restricting access to the files goes, just make a password and send the password to whoever you want to have it.

VIPStephan
08-11-2006, 05:14 PM
Access to a specific directory can be restricted through the .htaccess file. I'm sure if you do a search you'll find a lot of info on that.