diff options
author | jld3103 <jld3103yt@gmail.com> | 2023-02-15 19:22:09 +0100 |
---|---|---|
committer | jld3103 <jld3103yt@gmail.com> | 2023-07-31 16:58:49 +0200 |
commit | c6806684d2deee11b64fb8250064115cea291659 (patch) | |
tree | fc1cbaac6ded03b68b4a08095ce987d4c2294255 /apps/files_sharing/lib/Controller/PublicPreviewController.php | |
parent | 46284f1696700c2553d8d2f5340ad3bcbad08470 (diff) | |
download | nextcloud-server-c6806684d2deee11b64fb8250064115cea291659.tar.gz nextcloud-server-c6806684d2deee11b64fb8250064115cea291659.zip |
files_sharing: Add OpenAPI spec
Signed-off-by: jld3103 <jld3103yt@gmail.com>
Diffstat (limited to 'apps/files_sharing/lib/Controller/PublicPreviewController.php')
-rw-r--r-- | apps/files_sharing/lib/Controller/PublicPreviewController.php | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/apps/files_sharing/lib/Controller/PublicPreviewController.php b/apps/files_sharing/lib/Controller/PublicPreviewController.php index ee11cf5f3f0..089610f711f 100644 --- a/apps/files_sharing/lib/Controller/PublicPreviewController.php +++ b/apps/files_sharing/lib/Controller/PublicPreviewController.php @@ -5,6 +5,7 @@ * @author Julius Härtl <jus@bitgrid.net> * @author Morris Jobke <hey@morrisjobke.de> * @author Roeland Jago Douma <roeland@famdouma.nl> + * @author Kate Döen <kate.doeen@nextcloud.com> * * @license GNU AGPL version 3 or any later version * @@ -82,11 +83,19 @@ class PublicPreviewController extends PublicShareController { * @PublicPage * @NoCSRFRequired * - * @param string $file - * @param int $x - * @param int $y - * @param bool $a - * @return DataResponse|FileDisplayResponse + * Get a preview for a shared file + * + * @param string $token Token of the share + * @param string $file File in the share + * @param int $x Width of the preview + * @param int $y Height of the preview + * @param bool $a Whether to not crop the preview + * @return FileDisplayResponse<Http::STATUS_OK, array{Content-Type: string}>|DataResponse<Http::STATUS_BAD_REQUEST|Http::STATUS_FORBIDDEN|Http::STATUS_NOT_FOUND, array<empty>, array{}> + * + * 200: Preview returned + * 400: Getting preview is not possible + * 403: Getting preview is not allowed + * 404: Share or preview not found */ public function getPreview( string $token, @@ -138,8 +147,15 @@ class PublicPreviewController extends PublicShareController { * @NoCSRFRequired * @NoSameSiteCookieRequired * - * @param $token - * @return DataResponse|FileDisplayResponse + * Get a direct link preview for a shared file + * + * @param string $token Token of the share + * @return FileDisplayResponse<Http::STATUS_OK, array{Content-Type: string}>|DataResponse<Http::STATUS_BAD_REQUEST|Http::STATUS_FORBIDDEN|Http::STATUS_NOT_FOUND, array<empty>, array{}> + * + * 200: Preview returned + * 400: Getting preview is not possible + * 403: Getting preview is not allowed + * 404: Share or preview not found */ public function directLink(string $token) { // No token no image |