implement uploadFile