File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ public function getPreview(
154154 $ mimeType = null ,
155155 bool $ cacheResult = true ,
156156 ): ISimpleFile {
157- $ this ->throwIfPreviewsDisabled ();
157+ $ this ->throwIfPreviewsDisabled ($ file );
158158 $ previewConcurrency = $ this ->getGenerator ()->getNumConcurrentPreviews ('preview_concurrency_all ' );
159159 $ sem = Generator::guardWithSemaphore (Generator::SEMAPHORE_ID_ALL , $ previewConcurrency );
160160 try {
@@ -178,7 +178,7 @@ public function getPreview(
178178 * @since 19.0.0
179179 */
180180 public function generatePreviews (File $ file , array $ specifications , $ mimeType = null ) {
181- $ this ->throwIfPreviewsDisabled ();
181+ $ this ->throwIfPreviewsDisabled ($ file );
182182 return $ this ->getGenerator ()->generatePreviews ($ file , $ specifications , $ mimeType );
183183 }
184184
@@ -455,8 +455,8 @@ private function registerBootstrapProviders(): void {
455455 /**
456456 * @throws NotFoundException if preview generation is disabled
457457 */
458- private function throwIfPreviewsDisabled (): void {
459- if (!$ this ->enablePreviews ) {
458+ private function throwIfPreviewsDisabled (File $ file ): void {
459+ if (!$ this ->isAvailable ( $ file ) ) {
460460 throw new NotFoundException ('Previews disabled ' );
461461 }
462462 }
You can’t perform that action at this time.
0 commit comments