namespace BookStack\Uploads;
use BookStack\Exceptions\ImageUploadException;
-use BookStack\Util\WebSafeMimeSniffer;
use ErrorException;
use Exception;
use Illuminate\Contracts\Cache\Repository as Cache;
}
$initialHeader = substr($imageData, 0, strpos($imageData, 'IDAT'));
+
return strpos($initialHeader, 'acTL') !== false;
}
$storage = $this->getStorageDisk($image->type);
if ($storage->exists($this->adjustPathForStorageDisk($thumbFilePath, $image->type))) {
$this->cache->put($thumbCacheKey, $thumbFilePath, 60 * 60 * 72);
+
return $this->getPublicUrl($thumbFilePath);
}
// Do not resize apng images where we're not cropping
if ($keepRatio && $this->isApngData($image, $imageData)) {
$this->cache->put($thumbCacheKey, $image->path, 60 * 60 * 72);
+
return $this->getPublicUrl($image->path);
}