Split out upload script