JENKINS-18045, JENKINS-18044 handle 0 and more than 1 uploads.