mirror of
https://github.com/gchq/CyberChef.git
synced 2026-01-07 01:33:29 -08:00
Output over 1MiB is passed back as an ArrayBuffer and an output file card is displayed.
This commit is contained in:
parent
0e7989111f
commit
af71ca6a25
7 changed files with 130 additions and 35 deletions
|
|
@ -79,13 +79,13 @@ InputWaiter.prototype.setFile = function(file) {
|
|||
fileName = document.getElementById("input-file-name"),
|
||||
fileSize = document.getElementById("input-file-size"),
|
||||
fileType = document.getElementById("input-file-type"),
|
||||
fileUploaded = document.getElementById("input-file-uploaded");
|
||||
fileLoaded = document.getElementById("input-file-loaded");
|
||||
|
||||
fileOverlay.style.display = "block";
|
||||
fileName.textContent = file.name;
|
||||
fileSize.textContent = file.size.toLocaleString() + " bytes";
|
||||
fileType.textContent = file.type;
|
||||
fileUploaded.textContent = "0%";
|
||||
fileLoaded.textContent = "0%";
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -210,8 +210,8 @@ InputWaiter.prototype.inputDrop = function(e) {
|
|||
InputWaiter.prototype.handleLoaderMessage = function(e) {
|
||||
const r = e.data;
|
||||
if (r.hasOwnProperty("progress")) {
|
||||
const fileUploaded = document.getElementById("input-file-uploaded");
|
||||
fileUploaded.textContent = r.progress + "%";
|
||||
const fileLoaded = document.getElementById("input-file-loaded");
|
||||
fileLoaded.textContent = r.progress + "%";
|
||||
}
|
||||
|
||||
if (r.hasOwnProperty("fileBuffer")) {
|
||||
|
|
@ -246,6 +246,7 @@ InputWaiter.prototype.clearIoClick = function() {
|
|||
document.getElementById("output-info").innerHTML = "";
|
||||
document.getElementById("input-selection-info").innerHTML = "";
|
||||
document.getElementById("output-selection-info").innerHTML = "";
|
||||
document.getElementById("output-file").style.display = "none";
|
||||
window.dispatchEvent(this.manager.statechange);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue