From 05e70337a0fc3519b1f157c93592bcda229f1c06 Mon Sep 17 00:00:00 2001 From: 0xSG <100090997+sxsmg@users.noreply.github.com> Date: Tue, 14 Oct 2025 14:49:19 +0530 Subject: [PATCH] fix(previews): set Content-Type header for Imaginary requests Signed-off-by: 0xSG <100090997+sxsmg@users.noreply.github.com> Signed-off-by: psyp1x Signed-off-by: Josh --- lib/private/Preview/Imaginary.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/private/Preview/Imaginary.php b/lib/private/Preview/Imaginary.php index e029823a9cff2..83905c8fac828 100644 --- a/lib/private/Preview/Imaginary.php +++ b/lib/private/Preview/Imaginary.php @@ -148,7 +148,9 @@ public function getCroppedThumbnail(File $file, int $maxX, int $maxY, bool $crop $imaginaryUrl . '/pipeline', [ 'query' => ['operations' => json_encode($operations), 'key' => $imaginaryKey], 'stream' => true, - 'content-type' => $file->getMimeType(), + 'headers' => [ + 'Content-Type' => $file->getMimeType(), + ], 'body' => $stream, 'nextcloud' => ['allow_local_address' => true], 'timeout' => 120,