Add test coverage for automatic file upload