Module openflax.handler.random

Display a random file from a certain directory.

Behaviour: openflax.handler.

Description

Display a random file from a certain directory.

This handler's security/featurefulness tradeoff level is 3 (Unobtrusive.) If not all the files are of the same content type, it might confuse some user agents. The res_content_type setting should be specified in the config file.

This handler requires openflax.handler.file.

Function Index

serve/1Serves a random file from this directory.
start/1Initializes the random-file-serving subsystem.
stop/1Shuts down the random-file serving subsystem.

Function Details

serve/1

serve(Conf::conf()) -> {response(), conf()}

Serves a random file from this directory.

start/1

start(Conf::conf()) -> conf()

Initializes the random-file-serving subsystem.

stop/1

stop(Conf::conf()) -> conf()

Shuts down the random-file serving subsystem.