Widget:File upload: verschil tussen versies
Uit Dorpsbelang Den Hout
Regel 104: | Regel 104: | ||
createPreviews(); | createPreviews(); | ||
} | } | ||
+ | |||
+ | fileInput.closest('form').querySelector('[type="submit"]').addEventListener('click', uploadFiles, false) | ||
+ | |||
} | } | ||
function uploadFiles(evt){ | function uploadFiles(evt){ | ||
+ | evt.preventDefault(); | ||
var files = fileInput.files; | var files = fileInput.files; | ||
var proms = []; | var proms = []; | ||
Regel 116: | Regel 120: | ||
} | } | ||
Promise.all(proms).then(function(values) { | Promise.all(proms).then(function(values) { | ||
− | + | fileInput.closest('form').submit(); | |
}); | }); | ||
} | } |
Versie van 7 sep 2020 09:57
This is the Widget:Multi upload page. It should be called in the following format:
{{#widget:Multi upload }}