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