starting upload functionality