MAX_DOWNLOAD_SIZE
MAX_DOWNLOAD_SIZE =3145728
Provide a file system cache. It is abstract as you should implement your own class for this with missing methods.
get(array<mixed,\DevOwl\HeadlessContentBlocker\plugins\imagePreview\Thumbnail> $thumbnails)
See `ImagePreviewCache`.
If there was an error with the file downloading previously, setError
for the Thumbnail
.
array<mixed,\DevOwl\HeadlessContentBlocker\plugins\imagePreview\Thumbnail> | $thumbnails | Key is the embed URL |
set(array<mixed,\DevOwl\HeadlessContentBlocker\plugins\imagePreview\Thumbnail> $thumbnails)
See `ImagePreviewCache`.
array<mixed,\DevOwl\HeadlessContentBlocker\plugins\imagePreview\Thumbnail> | $thumbnails | Key is the embed URL |
allowance(array<mixed,\DevOwl\HeadlessContentBlocker\plugins\imagePreview\Thumbnail> $thumbnails)
Our image preview processor has found a thumbnail URL for a given website URL. Let's check if using this thumbnail URL is allowed by using `setAllowance`. Why? This could be a license/copyright violation and needs to be consent by the user via a custom UI.
array<mixed,\DevOwl\HeadlessContentBlocker\plugins\imagePreview\Thumbnail> | $thumbnails | Key is the embed URL |
__construct(string $absolutePath,string $prefixUrl,integer $invalidateSeconds)
C'tor.
string | $absolutePath | Needs to end with |
string | $prefixUrl | Needs to end with |
integer | $invalidateSeconds |
Absolute path is not writable or does not exist
setBySingleResult(array $handle,\DevOwl\HeadlessContentBlocker\plugins\imagePreview\Thumbnail $thumbnail)
Single process a result within `$this::set()`.
array | $handle | |
\DevOwl\HeadlessContentBlocker\plugins\imagePreview\Thumbnail | $thumbnail |