Middleware that transparently caches file upload files between form submissions to avoid losing file selection on validation error.