code: private String buildNativeMediaUrl() {
      String path = null;
  
      Resource parentResource = this.resource.getParent();
      if (JcrBinary.isNtFile(parentResource)) {
        // if parent resource is nt:file and its node name equals the detected filename, directly use the nt:file node path
        if (StringUtils.equals(parentResource.getName(), getFileName())) {
          path = parentResource.getPath();
        }
        // otherwise use nt:file node path with custom filename
        else {
          path = parentResource.getPath() + "./" + getFileName();
        }
      }
      else {
        // nt:resource node does not have a nt:file parent, use its path directly
        path = this.resource.getPath() + "./" + getFileName();
      }
  
      // build externalized URL
      UrlHandler urlHandler = AdaptTo.notNull(this.adaptable, UrlHandler.class);
      return urlHandler.get(path).urlMode(this.mediaArgs.getUrlMode()).buildExternalResourceUrl(this.resource);
    }
docs: Builds "native" URL that returns the binary data directly from the repository.
  @return Media URL