1👍
✅
The JS snippet that you have posted shows where you need to handle the returned JSON. The data is passed to your success function as “responseText”:
this.on("success", function(file, responseText) {
file.previewTemplate.appendChild(responseText);
});
but you will probably want to use JSON.parse
to convert it to actual JS objects.
Source:stackexchange.com