I am developing a web app on google app engine using java.I have links to many files and I have to provide a link to download all these files as zip.
The one way I can think of is to download all these files on gae server,zip them using some java code ,upload the zip back to gae servers and prompt the user to download this zip file,and delete the zip from server once user has downloaded it.
Is there a better solution.I would prefer to have a solution without using external services.
can I download the files as one by one and zip them on client side using javascript?
lookimg for something like gmail’s download all attachments
Javascript does not have the capability to conduct what you wish due to security reasons. The former approach would be feasible to handling your problem.
Rather than using Java code to zip it for you, I would suggest you simply use a system call:
This will zip all the files in the runtime’s current directory in an archive called
tmp.zip.