So I am working with some data that gets sent back from the server after a file upload in Javascript. It is sending back a URL, and I need it to appear as a hyperlink and append it to the document. What is the best way to go about doing this? I could do it serverside though that doesn't seem to be very clean, and I googled and found the str.link() method but read it was deprecated. My code in JS:
init: function() {
this.on("success", function(file, responseText) {
var span = document.createElement('span');
span.setAttribute("style", "position: absolute; bottom: -28px; left: 3px; height: 28px; line-height: 28px; ");
span.innerHTML = responseText;
file.previewTemplate.appendChild(span);
});
}