diff --git a/apps/files_trashbin/lib/Controller/PreviewController.php b/apps/files_trashbin/lib/Controller/PreviewController.php
index 86789714057d3ed52a8f1023f0db2e29ac3bec5e..a734454bd503b1360a948f69e9a6b684f397b529 100644
--- a/apps/files_trashbin/lib/Controller/PreviewController.php
+++ b/apps/files_trashbin/lib/Controller/PreviewController.php
@@ -88,12 +88,12 @@ class PreviewController extends Controller {
 	 * @return DataResponse|Http\FileDisplayResponse
 	 */
 	public function getPreview(
-		int $fileId,
+		int $fileId = -1,
 		int $x = 128,
 		int $y = 128
 	) {
 
-		if ($x === 0 || $y === 0) {
+		if ($fileId === -1 || $x === 0 || $y === 0) {
 			return new DataResponse([], Http::STATUS_BAD_REQUEST);
 		}