Yes, It was ArcGIS SDK for JS. I tried with the KMLLayer Class but it was not working when we create it from the upload file. Creating a URL from the Blob and adding it to the KMLLayer Class.
const blob = new Blob([fileReader.result], {
type: "application/vnd.google-earth.kml+xml"
});
const url = URL.createObjectURL(blob);
console.log(url);
// window.open(url, '_blank');
externallayer = new KMLLayer({
url: url,
});
It shows invalid KML data.