Updated to work with both UploadImage/Data