Cannot upload new content #1436

This commit is contained in:
Karel Pičman 2023-03-15 10:49:52 +01:00
parent c4fcdf70f2
commit 9638b4c31d

View File

@ -52,7 +52,7 @@ function dmsfAddFile(inputEl, file, eagerUpload) {
let attachments = $('#dmsf_attachments_fields');
let max = ($(inputEl).attr('multiple') == 'multiple') ? 10 : 1
if (attachments.children.length < max) {
if (attachments.children().length < max) {
let attachmentId = dmsfAddFile.nextAttachmentId++;
let fileSpan = $('<span>', { id: 'dmsf_attachments_' + attachmentId, 'class': 'attachment' });