Sanitize upload response (Fixes #79)

This commit is contained in:
andreimarcu 2016-06-15 00:16:57 -07:00
parent e8d2d75c1c
commit d6755486b2
1 changed files with 3 additions and 0 deletions

View File

@ -88,6 +88,9 @@ Dropzone.options.dropzone = {
if (resp.error) { if (resp.error) {
file.fileLabel.innerHTML = file.name + ": " + resp.error; file.fileLabel.innerHTML = file.name + ": " + resp.error;
} }
else if (resp.includes("<html")) {
file.fileLabel.innerHTML = file.name + ": Server Error";
}
else { else {
file.fileLabel.innerHTML = file.name + ": " + resp; file.fileLabel.innerHTML = file.name + ": " + resp;
} }