Multiple files upload #1559

This commit is contained in:
Karel Pičman 2024-10-22 15:12:39 +02:00
parent c780e8e349
commit c1b4192f35

View File

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