misc: display potential file upload error in field (#35792)

This commit is contained in:
Frédéric Péters 2019-09-03 18:02:15 +02:00
parent fb7eea53a8
commit 26f5321cad
1 changed files with 5 additions and 0 deletions

View File

@ -275,6 +275,11 @@ $.WcsFileUpload = {
}
},
done: function(e, data) {
if (data.result[0].error) {
$(base_widget).find('.fileprogress').addClass('upload-error');
$(base_widget).find('.fileprogress .bar').text(data.result[0].error);
return;
}
$(base_widget).find('.fileprogress').hide();
$(base_widget).find('.filename').text(data.result[0].name);
$(base_widget).find('.fileinfo').show();