Multiple files upload #1559

This commit is contained in:
Karel Pičman 2024-10-22 14:50:22 +02:00
parent 0af328d211
commit c780e8e349
2 changed files with 6 additions and 11 deletions

File diff suppressed because one or more lines are too long

View File

@ -151,8 +151,9 @@ 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 (attachments.children().length < max) {
if (n < max) {
let attachmentId = dmsfAddFile.nextAttachmentId++;
let fileSpan = $('<span>', { id: 'dmsf_attachments_' + attachmentId, 'class': 'attachment' });