Back to Missing from iCloud

FORCING A FILE TO DOWNLOAD

If you provide a link to a file which is a type a browser can display - .jpg, .gif, png, .mpr.],. m4v etc - it will open and display the file. If you want to force it to download the file itself the simplest, though less elegant, way is to zip the file - as this is a format the browser doesn't know it will download it.

However you can force a download of a file without zipping it - this is what MobileMe's 'File Sharing' facility does, but you cannot replicate this exactly on other servers.

You have to place your files for download in a particular folder, and add an 'htaccess' file to it to force downloads of any file in that folder. This will only work if your web hosting company allows it - some may not.

Using a plain text editor such as TextEdit - in plain text mode, not Rich Text which is often the default - create a file called htaccess.txt and copy this into it:

<Files *.*>
ForceType applicaton/octet-stream
</Files>

(I know 'applicaton' looks wrong, but it works: so should 'application' but when I tried that it worked in FireFox but not in Safari... go figure...)

Using an FTP client, upload this file to the folder. Once it's there, use the client to change its name: firstly remove the .txt from the end, then add a period on the beginning, so that it looks like this:

.htaccess

You will get a warning that this will make the file invisible - agree to this. The file will disappear when you refresh the FTP client; however it will still be there and you will find that links to files in that folder cause a download.

Of course if you want to be able to display this file as well you will have to use a duplicate in another folder; though oddly enough .mp3 files in an embedded player will work.

(My thanks to Julian Wright for telling me about this method.)