The lighttpd in defaults does not use streaming. Every request is first
collected to temporally directory and only when it is complete is
processed. The default directory used for this (the upload-dirs option)
/var/tmp which is in RAM in our case (and that is for sure what we
want to not damage flash storage). The issue is that for big requests
such as upload or download of big files that are way bigger than our RAM
this triggers OOM.
This in default configures Lighttpd to always use streaming (this should probably be system default on OpenWrt but let's enforce it here as well till that is the case) thus not using '/var/tmp' at all. Once the storage plugin is configured the configuration changes and we use directory '/srv/.lighttpd-tmp' to buffer requests.
The login here is based on the one for syslog-ng configuration.
Continuation of: turris/os/packages#665 (closed)
On notice to @gstrauss