Upload errors show up and can be closed properly

This commit is contained in:
HugoNeveux 2020-04-27 19:00:49 +02:00
parent f7e92f81af
commit dfcecd47e0

View File

@ -66,8 +66,10 @@ $('#multiFileUpload').dropzone({
let res = eval('(' + data.xhr.responseText + ')');
});
this.on("error", function(file, message) {
$('.alert').html('');
$('#errorZone').append(message.error);
if ($('#errorMsg').length > 0) {
$('#errorMsg').remove();
}
$('#errorZone').append(`<span id="errorMsg">${message.error}</span>`);
$('#errorZone').show();
});
this.on('sending', function(file, xhr, formData) {