Hello, I was added file upload and works great. I'm trying to merge my manual upload with uploaded files list.
File upload control works as expected, I also added Text edit control and a custom button to send text edit data to server and it returns as file name, size and extension.
How I can add this result into file upload's uploaded list?
here is screenshot
Upload text button's script:
document.getElementById("btnUploadText").addEventListener('click', function () {
var file1 = document.getElementById("file1").ej2_instances[0];
console.log(file1.inputElement.innerText);
$.ajax({
type: "POST",
url: '@Url.Action("UploadText", "Order")',
data: { text: file1.inputElement.innerText },
success: function(data){
console.log(data); // returns: {"name":"upload_1","size":75,"type":".txt"}
},
});
});
Thanks for help!