diff --git a/lib/private/Preview/Movie.php b/lib/private/Preview/Movie.php index cfc05b8cce99b..7eedb4e73a8f1 100644 --- a/lib/private/Preview/Movie.php +++ b/lib/private/Preview/Movie.php @@ -68,6 +68,12 @@ public function getThumbnail(File $file, int $maxX, int $maxY): ?IImage { // in some cases this doesn't work for example when the moov atom is at the // end of the file, so if it fails we fall back to getting the full file $sizeAttempts = [5242880, null]; + + // do not attempt to download the file if the storage is not local (e.g. S3) + // We don't want to download the whole (e.g. 37Gb) file + if (!$file->getStorage()->isLocal()) { + $sizeAttempts = [5242880]; + } } else { // size is irrelevant, only attempt once $sizeAttempts = [null];