Developer forum

Forum » CMS - Standard features » Multiple file upload - forms for editors

Multiple file upload - forms for editors

Charlotte Mogensen
Reply

I made a simple template for Esbjerg kommune, that should handle multiple file uploade on the page:
http://www.esbjergkommune.dk/Default.aspx?ID=15672&Purge=True 
 
But when I use it to upload 2 different files, it uploads one of the files twice instead, and none of the other file. Is that because the module can't handle that?
Would be nice to have multiple upload as a standard.

 

Kind regards,
Charlotte


Replies

 
Nicolai Pedersen
Reply

The module can handle multiupload using a single file and also supports multiple file fields.

There was a fix regarding upload and naming of files in 8.9.0.0. Which version is this? And can you shoot a Jing of it?

Thanks, Nicolai

 
Charlotte Mogensen
Reply

Esbjerg is version 8.7.2.8 so I tried on Holstebro.dk instead which is 8.9.1.2 - but I can't see any difference in the Forms for editors module when using the file upload type: https://www.screencast.com/t/JmJyuTxkCy8 . How do I instruct this upload button to take multiple files as standard?

Test page: https://holstebro.dk/Default.aspx?ID=10311&Purge=True 

Thanks, Charlotte

 
Nicolai Pedersen
Reply

Hi Charlotte

Oh, now I get it. You need to add the Multiple attribute to the input - dw does not support that out of the box (maybe we should by default):
https://www.w3schools.com/tags/att_input_multiple.asp

You might be able to do it using JS: document.getElementById("fileInputId").setAttribute("multiple", "")

BR Nicolai

 
Charlotte Mogensen
Reply

Hi :) - that is exactly what I did at the beginning at Esbjerg (but it turned out that Esbjerg deleted the upload field from the form in the meantime...) So now I set up a new testpage with only the multiple upload field here:  http://www.esbjergkommune.dk/Default.aspx?ID=15814&Purge=True 
When I test it, I get 2 of the first file and none of the second file: http://www.esbjergkommune.dk/Default.aspx?ID=15814&Purge=True 

So, that must be because DW or the module does something funny, right :)? Could it be fixed in standard to always allow multiple upload?

 
Charlotte Mogensen
Reply

I know of several customers who like multiple upload to be standard - could you maybe add that to some future DW9 version?

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Charlotte

Yes, that has been added to DW9 (Dynamicweb.Forms 1.0.8) and in the next hotfix og 8.9.2. TFS#31879

BR Nicolai

Votes for this answer: 2

 

You must be logged in to post in the forum