aboutsummaryrefslogtreecommitdiffstats
path: root/core/Controller/PreviewController.php
diff options
context:
space:
mode:
authorprovokateurin <kate@provokateurin.de>2024-05-13 12:47:24 +0200
committerprovokateurin <kate@provokateurin.de>2024-05-13 12:47:24 +0200
commitdd997b6ac7738822a52f6ccd94d133dfeb8a82ec (patch)
tree11b31862ae0313fe866f18abd66c82b85f4323ab /core/Controller/PreviewController.php
parentc31d6b1fdc502844ab907355bb553feb451cdda3 (diff)
downloadnextcloud-server-dd997b6ac7738822a52f6ccd94d133dfeb8a82ec.tar.gz
nextcloud-server-dd997b6ac7738822a52f6ccd94d133dfeb8a82ec.zip
docs(preview): Improve API parameter descriptions
Signed-off-by: provokateurin <kate@provokateurin.de>
Diffstat (limited to 'core/Controller/PreviewController.php')
-rw-r--r--core/Controller/PreviewController.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/Controller/PreviewController.php b/core/Controller/PreviewController.php
index 7ab22dceaa2..301bc134381 100644
--- a/core/Controller/PreviewController.php
+++ b/core/Controller/PreviewController.php
@@ -61,11 +61,11 @@ class PreviewController extends Controller {
* Get a preview by file path
*
* @param string $file Path of the file
- * @param int $x Width of the preview
- * @param int $y Height of the preview
- * @param bool $a Whether to not crop the preview
+ * @param int $x Width of the preview. A width of -1 will use the original image width.
+ * @param int $y Height of the preview. A height of -1 will use the original image height.
+ * @param bool $a Preserve the aspect ratio
* @param bool $forceIcon Force returning an icon
- * @param string $mode How to crop the image
+ * @param 'fill'|'cover' $mode How to crop the image
* @param bool $mimeFallback Whether to fallback to the mime icon if no preview is available
* @return FileDisplayResponse<Http::STATUS_OK, array{Content-Type: string}>|DataResponse<Http::STATUS_BAD_REQUEST|Http::STATUS_FORBIDDEN|Http::STATUS_NOT_FOUND, array<empty>, array{}>|RedirectResponse<Http::STATUS_SEE_OTHER, array{}>
*
@@ -105,11 +105,11 @@ class PreviewController extends Controller {
* Get a preview by file ID
*
* @param int $fileId ID of the file
- * @param int $x Width of the preview
- * @param int $y Height of the preview
- * @param bool $a Whether to not crop the preview
+ * @param int $x Width of the preview. A width of -1 will use the original image width.
+ * @param int $y Height of the preview. A height of -1 will use the original image height.
+ * @param bool $a Preserve the aspect ratio
* @param bool $forceIcon Force returning an icon
- * @param string $mode How to crop the image
+ * @param 'fill'|'cover' $mode How to crop the image
* @param bool $mimeFallback Whether to fallback to the mime icon if no preview is available
* @return FileDisplayResponse<Http::STATUS_OK, array{Content-Type: string}>|DataResponse<Http::STATUS_BAD_REQUEST|Http::STATUS_FORBIDDEN|Http::STATUS_NOT_FOUND, array<empty>, array{}>|RedirectResponse<Http::STATUS_SEE_OTHER, array{}>
*