Changed upload controller to a helper class to use in controller functions