Loading BookImageDataHandler.inc.php +2 −3 Original line number Diff line number Diff line Loading @@ -49,9 +49,8 @@ class BookImageDataHandler extends CatalogBookHandler $pathInfo = pathinfo($publicationFile->getData('path')); $imagePath = $pathInfo['dirname'] . DIRECTORY_SEPARATOR . $pathInfo['filename'] . DIRECTORY_SEPARATOR . $imgName; $fs = Services::get('file')->fs; $mimetype = $file->mimetype ?? 'application/octet-stream'; $filesize = $fs->fileSize($imagePath); $filesize = $this->fs->fileSize($imagePath); $encodedFilename = urlencode($imgName); header("Content-Type: {$mimetype}"); header("Content-Length: {$filesize}"); Loading @@ -59,7 +58,7 @@ class BookImageDataHandler extends CatalogBookHandler header('Content-Disposition: inline' . ";filename=\"{$encodedFilename}\";filename*=UTF-8''{$encodedFilename}"); header('Cache-Control: private'); // Workarounds for IE weirdness header('Pragma: public'); fpassthru($fs->readStream($imagePath)); fpassthru($this->fs->readStream($imagePath)); exit; Loading Loading
BookImageDataHandler.inc.php +2 −3 Original line number Diff line number Diff line Loading @@ -49,9 +49,8 @@ class BookImageDataHandler extends CatalogBookHandler $pathInfo = pathinfo($publicationFile->getData('path')); $imagePath = $pathInfo['dirname'] . DIRECTORY_SEPARATOR . $pathInfo['filename'] . DIRECTORY_SEPARATOR . $imgName; $fs = Services::get('file')->fs; $mimetype = $file->mimetype ?? 'application/octet-stream'; $filesize = $fs->fileSize($imagePath); $filesize = $this->fs->fileSize($imagePath); $encodedFilename = urlencode($imgName); header("Content-Type: {$mimetype}"); header("Content-Length: {$filesize}"); Loading @@ -59,7 +58,7 @@ class BookImageDataHandler extends CatalogBookHandler header('Content-Disposition: inline' . ";filename=\"{$encodedFilename}\";filename*=UTF-8''{$encodedFilename}"); header('Cache-Control: private'); // Workarounds for IE weirdness header('Pragma: public'); fpassthru($fs->readStream($imagePath)); fpassthru($this->fs->readStream($imagePath)); exit; Loading