Extract upload and provision functions