Refactor uploads so that config files and normal files share more code.
Refactor uploads so that config files and normal files share more code.

jmchilton/lwr,ssorgatem/pulsar,ssorgatem/pulsar,natefoo/pulsar,jmchilton/pulsar,galaxyproject/pulsar,jmchilton/lwr,jmchilton/pulsar,natefoo/pulsar,galaxyproject/pulsar