Browse Source

Sanitize upload response (Fixes #79)

pull/87/head
andreimarcu 9 years ago
parent
commit
d6755486b2
  1. 3
      static/js/upload.js

3
static/js/upload.js

@ -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;
} }

Loading…
Cancel
Save