User:Pcj/UploadMultipleFiles.js

$("#bodyContent").append('');

// copy the above, then specify the files in the file dialog, then copy the below.

files = $("#multiupload")[0].files; curFile = 0; function gNF { if(curFile>files.length) return; if(files[curFile] == undefined) { curFile++; gNF; return; }	$.ajax({url:'/api.php',data:{action:'query',meta:'tokens',format:'json'},dataType:'json'}).done(function(data) {		fd = new FormData;		fd.append("action","upload");		fd.append("token",data.query.tokens.csrftoken);		fd.append("filename",files[curFile].name);		fd.append("file",files[curFile]);		fd.append("text","TEXT TO GO ON FILE PAGE GOES HERE"); //update as appropriate		fd.append("ignorewarnings",1);		$.ajax({ url:'/api.php', method:'POST', data:fd, cache:false, contentType:false, processData:false, type:'POST' }).done(function(d){ curFile++; gNF; });   }); } gNF;