Change upload to understand new db structure