diff --git a/server/camlistored/ui/permanode.html b/server/camlistored/ui/permanode.html index 878ae87e9..229a97c4a 100644 --- a/server/camlistored/ui/permanode.html +++ b/server/camlistored/ui/permanode.html @@ -81,7 +81,7 @@ -
+
or drag & drop files here
diff --git a/server/camlistored/ui/permanode.js b/server/camlistored/ui/permanode.js index 94148a7fd..38f6d078d 100644 --- a/server/camlistored/ui/permanode.js +++ b/server/camlistored/ui/permanode.js @@ -247,11 +247,20 @@ function startFileUpload(file) { function onFileFormSubmit(e) { e.stopPropagation(); e.preventDefault(); - alert("TODO: upload"); + handleFiles(document.getElementById("fileInput").files); } +function $(id) { return document.getElementById(id) } + function onFileInputChange(e) { - handleFiles(document.getElementById("fileInput").files); + var s = ""; + var files = $("fileInput").files; + for (var i = 0; i < files.length; i++) { + var file = files[i]; + s += "" + file.name + "
"; + } + var fl = $("filelist"); + fl.innerHTML = s; } function setupFilesHandlers() {