Widget:Multi upload: verschil tussen versies
Uit Dorpsbelang Den Hout
(4 tussenliggende versies door dezelfde gebruiker niet weergegeven) | |||
Regel 30: | Regel 30: | ||
} | } | ||
− | function uploadFiles(mode | + | function uploadFiles(mode){ |
var files = document.getElementById('files').files; | var files = document.getElementById('files').files; | ||
var proms = []; | var proms = []; | ||
for(i = 0; i < files.length; ++i){ | for(i = 0; i < files.length; ++i){ | ||
file = files[i]; | file = files[i]; | ||
− | if( | + | if(mode == "logo"){ |
− | var fileName = | + | var fileName = document.querySelector('input[name="Domein"]').value.replace('.','-')+'-logo.png'; |
}else{ | }else{ | ||
var fileName = files[i].name; | var fileName = files[i].name; | ||
Regel 143: | Regel 143: | ||
var params = { | var params = { | ||
action: 'edit', | action: 'edit', | ||
− | title: 'File:'file, | + | title: 'File:'+file, |
text: newWikitextEdit, | text: newWikitextEdit, | ||
format: 'json' | format: 'json' |
Huidige versie van 18 aug 2020 om 21:34
This is the Widget:Multi upload page. It should be called in the following format:
{{#widget:Multi upload }}