aboutsummaryrefslogtreecommitdiffstats
path: root/core/Controller/PreviewController.php
diff options
context:
space:
mode:
authorprovokateurin <kate@provokateurin.de>2024-01-10 12:35:44 +0100
committerprovokateurin <kate@provokateurin.de>2024-02-21 12:07:50 +0100
commit2c51933b6bc5e8f2633114e9acc493fb72a314d7 (patch)
tree43100b132f7e9cd4e899edf0584884c7fa9f0cbc /core/Controller/PreviewController.php
parent0117cd26940f2b0dcfd92ccf663bcf8853437193 (diff)
downloadnextcloud-server-2c51933b6bc5e8f2633114e9acc493fb72a314d7.tar.gz
nextcloud-server-2c51933b6bc5e8f2633114e9acc493fb72a314d7.zip
refactor(core): Switch to attribute based routing
Signed-off-by: provokateurin <kate@provokateurin.de>
Diffstat (limited to 'core/Controller/PreviewController.php')
-rw-r--r--core/Controller/PreviewController.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/Controller/PreviewController.php b/core/Controller/PreviewController.php
index 7adec03814c..34c21bd3ecb 100644
--- a/core/Controller/PreviewController.php
+++ b/core/Controller/PreviewController.php
@@ -30,6 +30,7 @@ namespace OC\Core\Controller;
use OCA\Files_Sharing\SharedStorage;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
+use OCP\AppFramework\Http\Attribute\FrontpageRoute;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\Http\FileDisplayResponse;
use OCP\AppFramework\Http\RedirectResponse;
@@ -74,6 +75,7 @@ class PreviewController extends Controller {
* 403: Getting preview is not allowed
* 404: Preview not found
*/
+ #[FrontpageRoute(verb: 'GET', url: '/core/preview.png')]
public function getPreview(
string $file = '',
int $x = 32,
@@ -117,6 +119,7 @@ class PreviewController extends Controller {
* 403: Getting preview is not allowed
* 404: Preview not found
*/
+ #[FrontpageRoute(verb: 'GET', url: '/core/preview')]
public function getPreviewByFileId(
int $fileId = -1,
int $x = 32,