rapache.app.from.registry(registry, page.param = "page", textarea.wrap.param = "textarea_wrap", device.param = "device", decoder.param = "decoder", max.regions.param = "max_annotated_regions", default.max.regions = 10000, force = FALSE, tmpdir = Sys.getenv("WEB_TMPDIR"), tmpdir.timeout.seconds = 600, devices = .default.device.list, other.mime.types = c(json = "application/json"), mime.types = c(sapply(devices, "[[", "mime.type"), other.mime.types), query.param.decoders = .build.default.query.param.decoders(), brand.builder = .default.brand.builder, logger = create.logger(stderr(), log4r:::FATAL))
tag.
This is needed to support file uploads in browsers, like IE9, that don't support XMLHttpRequest2. Default "textarea_wrap". In addition
to wrapping in textarea the response type will be set to "text/html", another hack that such browsers require.$mime.type
and $function
, being the ploting function.
Default is given by the private variable .default.device.list
, and includes svg and png (but
uses a modified png function so that it accepts units inches).
Which one to be used (in the default scenario, a choice between svg
and png
)
is controlled by the special device.param
parameter. If that is not provided
then the first device from this vector is used (default default is therefore "svg", which is the
best since it can be annotated, but older browsers such as IE8 will need to do PNGs).devices
to MIME types that can be served out of the temporary storage/retrieval area.
Default: c(json = "application/json")
.devices
and add to them those in other.mime.tpyes
.decoder.param
parameter). The values are functions which do the decoding. Default is just list(url=urlDecode)
.
urlDecode
is a function supplied by RApache (or by testing framework).brand.builder
function is to return a string that should be used in the top-left corner of the web page to briefly summarize
the current state. The default brand builder always returns the string "AnalysisPageServer".Next you have to tell apache to source your script upon startup. The directive for your httpd.conf is as follows:
RSourceOnStartup "/gne/home/friedmab/scr/apache-test/R-startup.R"
Finally, you have to register the five handlers. This is done as follows