How the upload file works