- Fix upload of files <= Request.max_body_length
File uploads smaller than the limit were not given to the handler as a
stream by microdot, instead the content is directly stored in the
request.body.
- Refactor stream to file copy into a helper method
- Increase the copy buffer size to 16k
- Call app.reset_idle_timeout() periodically during file uploads to
avoid the device turning off when uploading large files while on
battery.
Signed-off-by: Matthias Blankertz <matthias@blankertz.org>