Auto-commit: Upload files in JavaScript