Downloads of my site

  j18psf 11:57 08 Feb 05
Locked

Hi

Im currently making a website for a local school, and i want to have a link on the page so that users can download files like school reports etc.

My problem is im not exactly sure how to make it so these files can be downloaded to the users pc or if it was an excel document for eg how can i get it to open on the users pc?

Is it just a case of putting a link on the site to the file on the server and then it will work automatically?

Thanks

  Taran 12:52 08 Feb 05

Excel, Word and PowerPoint all have free veiwers that can be downloaded from the Microsoft website (try a Google search for them).

If you include a link to the relevant Microsoft web page next to the file(s) you offer it allows people who do not have Excel, Word and PowerPoint installed to open and view the documents.

If the user already has Microsoft Office installed and they click on a link to a Word or Excel file, the file will either open by default intot he web browser using the Office plugin or it will prompt the user whether to open or save the file - this depends very much on how things have been set up on the site visitor's computer.

Make a folder in the web root and call it downloads. Make folders inside this and call them word, excel, powerpoint etc. Note the use of lower case letter - no capital letters allowed.

Put the Word documents into the word folder inside the downloads folder.

Create a hyperlink on the web page you want poeple to access the file from and target it like this:

<

a href=

"downloads/word/file_name.doc">

Click Here</a>

What that does is tell the "Click Here" words to link to a file called file_name.doc in the word folder in the downloads folder, hence the file target of downloads/word/file_name.doc

Note that I used an underscore character to separate the words in the Word document file name, like this file_name.doc

A general rule of thumb is to avoid capital letters and spaces in file and folder names for the web.

You might want to include some text next to each link along the lines of:

"To save this file to your computer, simply right click on the link and select Save Target As"

Note that other web browsers have a slightly different wording in the file save dialog, but Save Target As is fine for Internet Explorer users who account for the vast majority of web users.

Any questions, feel free to ask.

  Taran 12:59 08 Feb 05

I should have added that if you have a large number of files to offer as downloads, it may be worth offering them is Zipped files to speed downloads up.

It will also be worth thinking of organising your file/folder structure to take large numbers of files into account.

For example, let's say you have a series of weekly reports to offer and accompanying notes. The reports are in Excel, the notes are in Word.

You could either Zip the corresponding notes and report files into one Zip archive or offer selective downloads basedon month and week number, or any other system that seems logical to you.

Organising your web this way stops you from getting into a serious mess later on.

If all reports were in folders like this:

downloads/financial_reports/january/week1/file_name.zip

you can keep track of what is where and why.

Logical naming structures for files and folders helps in the long term management if sites and you should always set out as if the site is going to evolve into something large, even if it does not seem to have that potential when you start.

Similarly all images should go into a folder called images. You can even used subfolders in the images folder for buttons anf thumbnails, like this:

images

images/buttons/

images/thumbnails/

It's all about keeping tabs on everything, so think about what makes sense to you and how you might like to organise things. It pays dividends in the long run.

  j18psf 13:01 08 Feb 05

Thanks very much Taran, a very speedy response, i now understand what i have to do.

You explained it in a very easy to follow way, much appreciated.

One last question though, is it the same for downloading video or sound files as it is for the office documents?

Just curious!

Thanks

Paul

  Taran 13:48 08 Feb 05

No.

Video and sound files will depend entirely on how the client (site visitor's computer) is configured.

Some computers will have browser plgin support to automatically launch certain media files into the default player. In fact, most systems are set up this way.

If you want to serve media files you're getting into a potentially complicated and sometimes costly situation.

Bandwidth is the least of your worries. Controlling who links to what and is allowed to download it is a primary concern. If someone hotlinks to your media files from another site you could end up paying large bandwidth costs for their visitors to download your files.

Many good web hosts try to prevent this by default, but some don't and it is largely down to you to secure your offerings.

Post again if you want more information but I'd seriously rethink serving large or lots of media files.

  j18psf 16:29 08 Feb 05

Yeah ill rethink the media files, was only wondering about how to do it for the future.

Your help has been much appreciated

Paul

  j18psf 20:39 08 Feb 05

Thanks FE i will take that issue into account

  Forum Editor 23:24 08 Feb 05

He's fourm member - I'm FE.

His advice is good though, as is Taran's.

  Taran 01:23 09 Feb 05

The hyperlink code I posted was intended as an example and I should have mentioned that point.

You should use descriptive link text where possible and also include title="" tags within the links if you can, along these lines:

<a href=whatever title="This link allows you to download the latest football league results in Word format">Right click here to download the latest football league placings</a>

What the above example does is present a pop-up tooltip when you place the cursor over the link, but to screenreader software it also allows you to describe, often in greater detail, where your link leads and to what.

Things like this help resolve accessibility issues before they present as a problem.

Thanks to fourm member for raising the point.

This thread is now locked and can not be replied to.

Best phone camera 2016/2017: Galaxy S7 vs iPhone 7 vs Google Pixel vs HTC 10 Evo vs OnePlus 3T vs…

1995-2015: How technology has changed the world in 20 years

These are the Best Christmas Ads and Studio Projects of 2016

Super Mario Run preview | Hands-on first impressions of Super Mario Run: Mario's iPhone & iPad…