Hi,
The easiest way to make a file downloadable is to put it in .zip format. Any zip file encountered by a browser will automatically prompt a download manager. If you have access to a server side scripting language (eg PHP) you can also use that to handle the download of a file (and make sure you get a save dialog, instead of the browser opening the file directly). when the server sends a file to the browser it is sent with a file type the browser uses this to determine what it should do with it, eg if the file type tells the browser it is opening a pdf file it can call up acrobat reader to open the file directly.
PHP can be used to modify the http headers so the file is sent with the content type application/octet-stream (a sort of general purpose type) instead of its normal file type. because the browser doesn't know what to do with a file of this type it simply prompts for the user to save it,
to do this you can create a php script like this,
Code:
<?php
// download.php
// retrieve the filename to download from the query string of the page
$file = $_GET['filename'];
// send the headers
header("Content-type: application/octet-stream");
header("Content-disposition: attachment; filename=$file");
// and output the contents of the file
readfile($file);
?>
now to download a file you could call the PHP script with getURL,
Code:
getURL("download.php?filename=documentfilename.pdf");
Bookmarks