summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2019-05-08 10:18:50 +0200
committerGitHub <noreply@github.com>2019-05-08 10:18:50 +0200
commitddff722aa48e487256ccc52c993dc3c15d371439 (patch)
tree6816eb3014738bb48f31988d5d3c33ca41ee3776
parenta3800a6810fca68eff1789dc21488389bf22108a (diff)
parent2565e167700f10086d231e72f5ef7ac870053cc9 (diff)
downloadnextcloud-server-ddff722aa48e487256ccc52c993dc3c15d371439.tar.gz
nextcloud-server-ddff722aa48e487256ccc52c993dc3c15d371439.zip
Merge pull request #15432 from nextcloud/fix/14986/fix-public-upload
Fix public upload by also load the semaphore method
-rw-r--r--apps/files/js/semaphore.js4
-rw-r--r--apps/files_sharing/lib/Controller/ShareController.php1
2 files changed, 5 insertions, 0 deletions
diff --git a/apps/files/js/semaphore.js b/apps/files/js/semaphore.js
index 044f0af23f3..aa327e0f8a1 100644
--- a/apps/files/js/semaphore.js
+++ b/apps/files/js/semaphore.js
@@ -32,6 +32,10 @@
};
};
+ // needed on public share page to properly register this
+ if (!OCA.Files) {
+ OCA.Files = {};
+ }
OCA.Files.Semaphore = Semaphore;
})();
diff --git a/apps/files_sharing/lib/Controller/ShareController.php b/apps/files_sharing/lib/Controller/ShareController.php
index 3bd65cd3974..0725e520b2d 100644
--- a/apps/files_sharing/lib/Controller/ShareController.php
+++ b/apps/files_sharing/lib/Controller/ShareController.php
@@ -412,6 +412,7 @@ class ShareController extends AuthPublicShareController {
}
// Load files we need
+ \OCP\Util::addScript('files', 'semaphore');
\OCP\Util::addScript('files', 'file-upload');
\OCP\Util::addStyle('files_sharing', 'publicView');
\OCP\Util::addScript('files_sharing', 'public');