From d27b762945c347a7b8bfd857d8e84211c2dda11a Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 12 Feb 2025 20:56:07 +0100 Subject: [PATCH] use Slim/Psr7/Stream --- restapi/index.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/restapi/index.php b/restapi/index.php index a5b17dfc1..943d1b79a 100644 --- a/restapi/index.php +++ b/restapi/index.php @@ -1286,7 +1286,7 @@ final class SeedDMS_RestapiController { /* {{{ */ if(!($fh = @fopen($file, 'rb'))) { return $this->renderer->json($response, array('success'=>false, 'message'=>'', 'data'=>''))->withStatus(500); } - $stream = new \Slim\Http\Stream($fh); // create a stream instance for the response body + $stream = new \Slim\Psr7\Stream($fh); // create a stream instance for the response body return $response->withHeader('Content-Type', $lc->getMimeType()) ->withHeader('Content-Description', 'File Transfer') @@ -1362,7 +1362,7 @@ final class SeedDMS_RestapiController { /* {{{ */ if(!($fh = @fopen($file, 'rb'))) { return $this->renderer->json($response, array('success'=>false, 'message'=>'', 'data'=>''))->withStatus(500); } - $stream = new \Slim\Http\Stream($fh); // create a stream instance for the response body + $stream = new \Slim\Psr7\Stream($fh); // create a stream instance for the response body return $response->withHeader('Content-Type', $lc->getMimeType()) ->withHeader('Content-Description', 'File Transfer') @@ -1467,7 +1467,7 @@ final class SeedDMS_RestapiController { /* {{{ */ if(!($fh = @fopen($file, 'rb'))) { return $this->renderer->json($response, array('success'=>false, 'message'=>'', 'data'=>''))->withStatus(500); } - $stream = new \Slim\Http\Stream($fh); // create a stream instance for the response body + $stream = new \Slim\Psr7\Stream($fh); // create a stream instance for the response body return $response->withHeader('Content-Type', $lc->getMimeType()) ->withHeader('Content-Description', 'File Transfer') @@ -1613,7 +1613,7 @@ final class SeedDMS_RestapiController { /* {{{ */ if(!($fh = @fopen($file, 'rb'))) { return $this->renderer->json($response, array('success'=>false, 'message'=>'', 'data'=>''))->withStatus(500); } - $stream = new \Slim\Http\Stream($fh); // create a stream instance for the response body + $stream = new \Slim\Psr7\Stream($fh); // create a stream instance for the response body return $response->withHeader('Content-Type', 'image/png') ->withHeader('Content-Description', 'File Transfer')