Minor fixes to `_generate_uploads`

While working on some other patches, I found a few things worth cleaning up.