Abstract common uploading logic

There will be several uploadable types so make a common
abstract routine for loading data in a transaction and reporting
the results.