public void doGet(HttpServletRequest req, HttpServletResponse res)
throws IOException {
BlobstoreService blobstoreService = BlobstoreServiceFactory.getBlobstoreService();
BlobKey blobKey = new BlobKey(req.getParameter("blob-key"));
// Writes the file bytes into the response
blobstoreService.serve(blobKey, res);
String filename = BlobstoreUtil.getFilename(blobKey);
log.info("Serving " + blobKey.getKeyString() + " as " + filename);
res.setHeader("Content-Disposition","attachment;filename=" + filename);
}
}