I used the methods suggested here:
Creating ZIP archives in Google App Engine ( Java)
And here How to create a zip archive containing google cloud storage objects within appengine java app?
to return a zip file, the problem I'm having is that the response is bigger than the allowed ~30M. What is the best practice to deal with it?
Most optimal way will be saving to Storage Bucket, and then serve it from there.
It also allows you to:
Basically i'm suggesting:
There're two options to serve this file later:
(optimal) Give a link directly to Storage object:
or by using Blobstore:
BlobstoreService blobstoreService = BlobstoreServiceFactory.getBlobstoreService();
BlobKey blobKey = blobstoreService.createGsBlobKey("/gs/<bucket>/<object>");
blobstoreService.serve(blobKey, resp); //where resp is your HttpServletResponse