Has anyone had success using the OGRE online converter to convert shape-files to a different format? I have been attempting to make this conversion by referring to . I have set up an AJAX call to send the file and receive the response, however, the response is returning with the error message "Cannot read property 'path' of undefined."
Below is a snippet of the code used for the AJAX call. The variable sFile represents the file uploaded through the control. I have tried various methods to attach the file as the 'data' parameter in the AJAX call (e.g. creating a FormData object, creating an object, etc.), but I keep encountering the same error.
function shapeFileProcessing(sFile){
var formdata = new FormData();
formdata.append("upload", sFile);
var obj = {};
obj.upload = sFile;
$.ajax({
url : 'http://ogre.adc4gis.com/convert',
data : obj,
type : "POST",
success : function(msg) {
console.log("Success: "+msg);
}
});
}
Additionally, when I tested the same process using Postman, it was successful in converting the file and providing it as a response [![enter image description here][1]][1]) [1]: https://i.sstatic.net/EJO8T.jpg