Fix failing tests from switch to fileobjs for uploads