Looking for a solution to send XML requests containing values and content from files obtained by filling out an HTML form. With 5 large files, some exceeding 70 MB, I have implemented JavaScript functions to load file contents and assemble the XML request. However, upon clicking the button to load the files, the browser crashes (even though the files can be opened in the browser separately). It seems that the browser is struggling to handle such large files. Any suggestions on where the issue might lie and how to resolve it? Could it possibly be related to a timeout?
Below is the function used to load the files:
function getFile1Content() {
var file = document.getElementById("file_zdr").files[0];
if (file) {
var reader = new FileReader();
reader.readAsText(file, "UTF-8");
reader.onloadend = function(evt) {
fileContent1 = evt.target.result;
loaded++;
console.log("FC1 " + fileContent1)
}
reader.onerror = function(evt) {
console.log("ERROR FC1");
}
}
}
Appreciate any insights or suggestions!