I've been trying to work out how to use JHP to download files. Basically I want the user to click on a button/link and be prompted to save a file to their disk. As far as I can see the webserver needs the following bits of information: * Path of file on server to be downloaded * Content-Type: <associated MIME type for file> * Content-Disposition: attachment; filename=<name of file presented to user> * Expires: <date/time for a cached version of the file to expire>
Currently I can point the user to a .jhp file and get them to be prompted to download a file with the same name as the .jhp file but the contents of whatever file I write to stdout, but I want to force the prompt and for it to be a name that I choose. To do that I think I need the Content-disposition Response header. Is this just a question of adding a ContentDisp verb to jhp.ijs analagous to ContentType? Or is there more involved? ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
