private BlobstoreService blobstoreService = BlobstoreServiceFactory.getBlobstoreService();
public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
Map<String, BlobKey> blobs = blobstoreService.getUploadedBlobs(req);
BlobKey blobKey = blobs.get("imageUploader");
log.info("BlobKey: " + blobKey);
if (blobKey != null) {
String imageUrl = ImagesServiceFactory.getImagesService().getServingUrl(blobKey);
String keyString = blobKey.getKeyString();
if (ServletHelper.isDevMode()) {
imageUrl = imageUrl.replace("http://0.0.0.0:", "http://127.0.0.1:");
}
res.sendRedirect("/adware/uploadService?url=" + imageUrl + "&key=" + keyString);