diff --git a/js/controllers/website-controller.js b/js/controllers/website-controller.js
index e5a4d3e..bd31d3c 100644
--- a/js/controllers/website-controller.js
+++ b/js/controllers/website-controller.js
@@ -11,10 +11,15 @@ function handleFiles(ev) {
return;
}
- $scope = angular.element(ev.target).scope();
+ $scope = angular.element(ev.target).scope();
// 'vm' is the Controller As name.
vm = $scope.vm;
vm.currentFiles = ev.target.files;
+ var file = vm.currentFiles[0];
+ vm.isZip = /\.zip$/.test(file.name);
+ vm.unzip = vm.isZip;
+ vm.stripZip = vm.isZip;
+ $scope.$digest();
console.log('vm.currentFiles', vm.currentFiles);
}
window.document.body.addEventListener('change', handleFiles);
@@ -25,6 +30,8 @@ app.controller('websiteCtrl', [
var vm = this;
vm.domains = [];
+ //vm.unzipPath = '/';
+ vm.webPath = '/';
Auth.api = function (apiname, opts) {
var els = [];
@@ -117,6 +124,9 @@ app.controller('websiteCtrl', [
, sld: vm.domain.sld
//, sub: vm.record.sub
, multipart: { site: vm.currentFiles[0] }
+ , unzip: vm.unzip
+ , strip: vm.stripZip
+ , path: vm.webPath
}).then(function (result) {
window.alert(JSON.stringify(result));
});
diff --git a/js/www@daplie.com.js b/js/www@daplie.com.js
index c72db44..28228fc 100644
--- a/js/www@daplie.com.js
+++ b/js/www@daplie.com.js
@@ -12,7 +12,7 @@ OAUTH3._pkgs['www@daplie.com'] = {
method: 'POST'
, url: OAUTH3.url.normalize(providerUri)
+ '/api/www@daplie.com/acl/add/' + opts.hostname
- + '?' + OAUTH3.utils.query.stringify({ tld: opts.tld, sld: opts.sld/*, sub: opts.sub*/ })
+ + '?' + 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
}).then(function (result) {
diff --git a/templates/website.html b/templates/website.html
index da3db76..0dede8b 100644
--- a/templates/website.html
+++ b/templates/website.html
@@ -44,7 +44,15 @@
-->