Bringing upload controller in line with unit tests