Skip to content

Commit 1f269e6

Browse files
committed
fixup! feat: make preview conversion timeout and max file size configurable
1 parent dc2040f commit 1f269e6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/Preview/Office.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ public function isAvailable(FileInfo $file): bool {
3838

3939
#[\Override]
4040
public function getThumbnail(File $file, int $maxX, int $maxY): ?IImage {
41-
if ($file->getSize() === 0) {
41+
$fileSize = $file->getSize();
42+
if ($fileSize === 0) {
4243
return null;
4344
}
4445

45-
$fileSize = $file->getSize();
4646
$maxFileSize = $this->appConfig->getPreviewConversionMaxFileSize();
4747
if ($fileSize > $maxFileSize) {
4848
$this->logger->debug('Skipping preview conversion: file size {size} exceeds limit {limit}', [

0 commit comments

Comments
 (0)