+ String imageId = (request.getMethod() == Method.POST) ? request.getHttpRequest().getPartAsStringFailsafe("image", 36) : request.getHttpRequest().getParam("image");
+ Image image = webInterface.getCore().getImage(imageId, false);
+ if (image == null) {
+ throw new RedirectException("invalid.html");
+ }
+ if (!webInterface.getCore().isLocalSone(image.getSone())) {
+ throw new RedirectException("noPermission.html");
+ }