mirror of
https://github.com/gchq/CyberChef.git
synced 2024-11-16 08:58:30 +01:00
Improved error handling for file uploads
This commit is contained in:
parent
0ba28dc891
commit
d38375a08c
2 changed files with 8 additions and 0 deletions
|
@ -214,6 +214,10 @@ InputWaiter.prototype.handleLoaderMessage = function(e) {
|
||||||
fileLoaded.textContent = r.progress + "%";
|
fileLoaded.textContent = r.progress + "%";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (r.hasOwnProperty("error")) {
|
||||||
|
this.app.alert(r.error, "danger", 10000);
|
||||||
|
}
|
||||||
|
|
||||||
if (r.hasOwnProperty("fileBuffer")) {
|
if (r.hasOwnProperty("fileBuffer")) {
|
||||||
log.debug("Input file loaded");
|
log.debug("Input file loaded");
|
||||||
this.fileBuffer = r.fileBuffer;
|
this.fileBuffer = r.fileBuffer;
|
||||||
|
|
|
@ -46,5 +46,9 @@ self.loadFile = function(file) {
|
||||||
seek();
|
seek();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
reader.onerror = function(e) {
|
||||||
|
self.postMessage({"error": file.error.message});
|
||||||
|
};
|
||||||
|
|
||||||
seek();
|
seek();
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue