upload() minor tidy up