mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-11-22 22:17:31 +03:00
Fixed exception when displaying large device file list.
This commit is contained in:
parent
12dc6b82fc
commit
d6bdf2ca04
2
public/scripts/agent-redir-ws-0.1.1-min.js
vendored
2
public/scripts/agent-redir-ws-0.1.1-min.js
vendored
File diff suppressed because one or more lines are too long
@ -206,7 +206,13 @@ var CreateAgentRedirect = function (meshserver, module, serverPublicNamePort, au
|
||||
obj.m.ProcessBinaryData(new Uint8Array(e.data));
|
||||
} else {
|
||||
// Send as Text
|
||||
obj.m.ProcessData(String.fromCharCode.apply(null, new Uint8Array(e.data)));
|
||||
if (e.data.byteLength < 16000) { // Process small data block
|
||||
obj.m.ProcessData(String.fromCharCode.apply(null, new Uint8Array(e.data))); // This will stack overflow on Chrome with 100k+ blocks.
|
||||
} else { // Process large data block
|
||||
var bb = new Blob([new Uint8Array(e.data)]), f = new FileReader();
|
||||
f.onload = function (e) { obj.m.ProcessData(e.target.result); };
|
||||
f.readAsText(bb);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user