use js to support uploading an arbitraty number of files