class ImageStoreUtil {

  public static String generatePostUploadUrl(String ssvmUrlDomain, String ipAddress, String uuid) {
    String hostname = ipAddress;

    //if ssvm url domain is present, use it to construct hostname in the format 1-2-3-4.domain
    // if the domain name is not present, ssl validation fails and has to be ignored
    if(StringUtils.isNotBlank(ssvmUrlDomain)) {
      hostname = ipAddress.replace(".", "-");
      hostname = hostname + ssvmUrlDomain.substring(1);
    }

    //only https works with postupload and url format is fixed
    return "https://" + hostname + "/upload/" + uuid;
  }

}