Caches file uploads when validation fails.