Upload functionality complete but not working