views:

31

answers:

1

I have a php script that will generate zip file.

header("Content-type: application/octet-stream");
header("Content-disposition: attachment; filename=random_name.zip");
echo $zipfile->file();

The filename is random and the server script doesn't even come with a return-file-uri function.

So my question is that how jQuery can handle this output (echo $zipfile->file()) so that I can download the zip file in the usual way?

Any help would be appreciated.

Regards,

Jesse

+1  A: 

jQuery doesn't handle downloads. Just point the browser to it directly.

Ignacio Vazquez-Abrams
thanks! I think it is almost a flight of fancy. lol I will look for another zip class to replace this one.