Need a new web host or having a problem with a script? Tips and advice on the best way to design, build and maintain your most valuable asset - your website!

How do i provide a link to download a zip file?

435pjjau251
Posts: 44
Joined: 17 Jun 11
Trust:

How do i provide a link to download a zip file?

Hello,

I have a website and i have a large zip file i want to provide to download to users. The file was uploaded via ftp to my server and i used an a href tag to provide a link to the file.

The probelm im having is when the link is clicked and the user is asked to save the file, it instantly saves as a 0kb size zip file which does not contain what it should. I have tried changing small parts of the syntax in the html for the link to no avail.

Whats the best way to provide a downloadable file to my users without forcing them to use an external program?

fyi the file is 3.8GB in size, is .zip, and is in the root directory of my server. My website is based on PhPBB3 but the file that provides the link is HTML.

Thanks
  • 0
essexboyracer
Posts: 130
Joined: 02 May 11
Trust:
Suggest you try uploading the file again, as it sounds like it hasn't uploaded correctly first time being such a huge filesize

EDIT: What are you offering your visitors to download at nearly 4GB in size? I would try and reduce that filesize first. That would take hours to download for your visitors and may take you over your bandwidth allowance on your hosting, therefore suspending your hosting account
  • 0
Last edited by essexboyracer on 07 Aug 11 9:40 am, edited 1 time in total.
 

PremiumMember
jmpruitt
Posts: 4723
Joined: 19 Jun 09
Trust:
do you have any blank spaces in the name of the zip file? if so this can cause problems with the link. rename the file either deleting blank spaces or else using - or _ to replace spaces.
  • 0
Your Focus Determines Your Reality
 
thel.online.ph
Posts: 109
Joined: 13 Sep 11
Trust:
Hi,

Why don't you just put those files in your regular site directory?

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.

Hope that helps.
  • 0

This topic was started on Aug 05, 2011 and has been closed due to inactivity. If you want to discuss this topic further, please create a new forum topic.

cron