JC-1449 - Error handling, extracting common functionality to the ImageUploadController