diff --git a/assets/oauth3.org b/assets/oauth3.org index effee98..a5742d1 160000 --- a/assets/oauth3.org +++ b/assets/oauth3.org @@ -1 +1 @@ -Subproject commit effee987beca6f0522a93533d65de1e7ed246987 +Subproject commit a5742d1a2aa42db0993081269beea695049d2805 diff --git a/js/controllers/website-controller.js b/js/controllers/website-controller.js index b98beb8..59ae9c4 100644 --- a/js/controllers/website-controller.js +++ b/js/controllers/website-controller.js @@ -148,10 +148,18 @@ app.controller('websiteCtrl', [ , sld: vm.domain.sld //, sub: vm.record.sub , multipart: { site: vm.currentFiles[0] } + , progress: function (ev) { + // TODO must digest + vm.uploadPercent = Math.round((ev.loaded / ev.total) * 100); + // TODO GiB, MiB, KiB, etc + vm.uploadTotal = (ev.total / (1024 * 1024)).toFixed(2); + vm.uploadProgress = (ev.loaded / (1024 * 1024)).toFixed(2); + } , unzip: vm.unzip , strip: vm.stripZip , path: vm.webPath }).then(function (result) { + vm.uploadTotal = 0; window.alert(JSON.stringify(result)); }); }; diff --git a/js/www@daplie.com.js b/js/www@daplie.com.js index c3ffa19..a474cf0 100644 --- a/js/www@daplie.com.js +++ b/js/www@daplie.com.js @@ -15,6 +15,7 @@ OAUTH3._pkgs['www@daplie.com'] = { + '?' + OAUTH3.utils.query.stringify({ tld: opts.tld, sld: opts.sld/*, sub: opts.sub*/, unzip: opts.unzip, strip: opts.strip, path: opts.path }) , session: session , multipart: opts.multipart // special property to be figured out by browser request code + , progress: opts.progress }).then(function (result) { return result; }); diff --git a/templates/website.html b/templates/website.html index e5ed3c3..16dd243 100644 --- a/templates/website.html +++ b/templates/website.html @@ -60,7 +60,9 @@ -