in src/main/java/org/apache/sling/thumbnails/internal/DynamicTransformServlet.java [120:130]
private Transformation getTransformation(SlingHttpServletRequest request) throws IOException {
String transformationPath = request.getParameter("transformationResource");
if (StringUtils.isNotBlank(request.getParameter("transformationResource"))) {
return Optional.ofNullable(request.getResourceResolver().getResource(transformationPath))
.map(r -> r.adaptTo(Transformation.class)).orElseThrow(
() -> new BadRequestException("Requested invalid transformation: " + transformationPath));
} else {
return new TransformationImpl(parsePostBody(request));
}
}