How does file upload work?