diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-09-27 23:27:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-27 23:27:54 +0200 |
commit | 5f25dd7095fadccb7458dbe09c048fbf6645552d (patch) | |
tree | 914341bb1e74a13e0ebaa113192982e4bbe162d9 /core | |
parent | 72889e57ca64f058f7cf206ac95cf6c0907ed771 (diff) | |
parent | 4077f684e137774f48cb1f575bc8a7bfd862c78b (diff) | |
download | nextcloud-server-5f25dd7095fadccb7458dbe09c048fbf6645552d.tar.gz nextcloud-server-5f25dd7095fadccb7458dbe09c048fbf6645552d.zip |
Merge pull request #6599 from nextcloud/fix_2523
Add direct preview link
Diffstat (limited to 'core')
-rw-r--r-- | core/routes.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/routes.php b/core/routes.php index a572c83d749..af445d9da8f 100644 --- a/core/routes.php +++ b/core/routes.php @@ -135,6 +135,14 @@ $this->create('files_sharing.sharecontroller.downloadShare', '/s/{token}/downloa throw new \OC\HintException('App file sharing is not enabled'); } }); +$this->create('files_sharing.publicpreview.directLink', '/s/{token}/preview')->get()->action(function($urlParams) { + if (class_exists(\OCA\Files_Sharing\AppInfo\Application::class, false)) { + $app = new \OCA\Files_Sharing\AppInfo\Application($urlParams); + $app->dispatch('PublicPreviewController', 'directLink'); + } else { + throw new \OC\HintException('App file sharing is not enabled'); + } +}); // used for heartbeat $this->create('heartbeat', '/heartbeat')->action(function(){ |