From eb1eb38c0174b542e388b32039589c0030ebd073 Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Sat, 23 Jul 2016 07:59:28 -0400 Subject: AJAX single upload might be working, but permissions problems seem to cause failure. --- vendor/sabre/dav/lib/DAV/Browser/Plugin.php | 7 ++- view/tpl/cloud_actionspanel.tpl | 88 +++++++++++++++++++++++++---- 2 files changed, 81 insertions(+), 14 deletions(-) diff --git a/vendor/sabre/dav/lib/DAV/Browser/Plugin.php b/vendor/sabre/dav/lib/DAV/Browser/Plugin.php index 49359a045..72b04065a 100644 --- a/vendor/sabre/dav/lib/DAV/Browser/Plugin.php +++ b/vendor/sabre/dav/lib/DAV/Browser/Plugin.php @@ -163,7 +163,7 @@ class Plugin extends DAV\ServerPlugin { * @return bool */ function httpPOST(RequestInterface $request, ResponseInterface $response) { - + $contentType = $request->getHeader('Content-Type'); list($contentType) = explode(';', $contentType); if ($contentType !== 'application/x-www-form-urlencoded' && @@ -179,7 +179,7 @@ class Plugin extends DAV\ServerPlugin { if ($this->server->emit('onBrowserPostAction', [$uri, $postVars['sabreAction'], $postVars])) { - switch ($postVars['sabreAction']) { + switch ($postVars['sabreAction']) { case 'mkcol' : if (isset($postVars['name']) && trim($postVars['name'])) { @@ -221,7 +221,8 @@ class Plugin extends DAV\ServerPlugin { if ($_FILES) $file = current($_FILES); else break; - + logger('$_FILES: ' . json_encode($_FILES)); + logger('$file: ' . json_encode($file)); list(, $newName) = URLUtil::splitPath(trim($file['name'])); if (isset($postVars['name']) && trim($postVars['name'])) $newName = trim($postVars['name']); diff --git a/view/tpl/cloud_actionspanel.tpl b/view/tpl/cloud_actionspanel.tpl index d4e187619..688b8f33d 100644 --- a/view/tpl/cloud_actionspanel.tpl +++ b/view/tpl/cloud_actionspanel.tpl @@ -9,24 +9,25 @@
{{if $quota.limit || $quota.used}}{{/if}} - +
- -
+ --> + +
-
- + +
or drop files here
@@ -36,7 +37,10 @@
- + +
+
+
@@ -68,10 +72,24 @@ \ No newline at end of file -- cgit v1.2.3