Module openflax.handler.upload

Upload handler for OpenFlax.

Behaviour: openflax.handler.

Description

Upload handler for OpenFlax.

This handler's security/featurefulness tradeoff level is 9 (Insecure.) It creates files in the filesystem. It never overwrites existing files.

This handler requires openflax.handler.file and openflax.handler.template.

This handler is intended to serve mostly as an example for writing an upload handler. It is suitable within a trusted environment such as a home LAN, but cannot be used without risk on a public network.

Function Index

serve/1Serves a resonse to an upload request.
start/1Initializes the uploads subsystem.
stop/1Shuts down the uploads subsystem.

Function Details

serve/1

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

Serves a resonse to an upload request. We assume the request was a multipart/form-data request, and instead of calling openflax.http.request:collect_body/1, we elect to receive the messages ourself.

start/1

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

Initializes the uploads subsystem.

stop/1

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

Shuts down the uploads subsystem.