Updating error display of max folder size

parent ab057194
...@@ -18,7 +18,12 @@ $( document ).ready(function() { ...@@ -18,7 +18,12 @@ $( document ).ready(function() {
} }
}); });
myDropzone.on("error", function(file, errorMessage) { myDropzone.on("error", function(file, errorMessage) {
var html = '<div class="alert alert-danger" role="alert">' + errorMessage + '</div>'; let html;
if (typeof(errorMessage) === 'object') {
html = '<div class="alert alert-danger" role="alert">' + errorMessage.errors.file.join(', ') + '</div>';
} else {
html = '<div class="alert alert-danger" role="alert">' + errorMessage + '</div>';
}
$('.col-md-12').first().prepend(html); $('.col-md-12').first().prepend(html);
setTimeout(function() { setTimeout(function() {
myDropzone.removeFile(file); myDropzone.removeFile(file);
......
...@@ -18,7 +18,12 @@ $( document ).ready(function() { ...@@ -18,7 +18,12 @@ $( document ).ready(function() {
} }
}); });
myDropzone.on("error", function(file, errorMessage) { myDropzone.on("error", function(file, errorMessage) {
var html = '<div class="alert alert-danger" role="alert">' + errorMessage + '</div>'; let html;
if (typeof(errorMessage) === 'object') {
html = '<div class="alert alert-danger" role="alert">' + errorMessage.errors.file.join(', ') + '</div>';
} else {
html = '<div class="alert alert-danger" role="alert">' + errorMessage + '</div>';
}
$('.col-md-12').first().prepend(html); $('.col-md-12').first().prepend(html);
setTimeout(function() { setTimeout(function() {
myDropzone.removeFile(file); myDropzone.removeFile(file);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment