\OCP\PreviewIProvider

Interface IProvider

Summary

Methods
Constants
getMimeType()
isAvailable()
getThumbnail()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

getMimeType()

getMimeType() : string

Returns

string —

Regex with the mimetypes that are supported by this provider

isAvailable()

isAvailable(\OCP\Files\FileInfo  $file) : boolean

Check if a preview can be generated for $path

Parameters

\OCP\Files\FileInfo $file

Returns

boolean

getThumbnail()

getThumbnail(string  $path, integer  $maxX, integer  $maxY, boolean  $scalingup, \OC\Files\View  $fileview) : boolean|\OCP\IImage

get thumbnail for file at path $path

Parameters

string $path

Path of file

integer $maxX

The maximum X size of the thumbnail. It can be smaller depending on the shape of the image

integer $maxY

The maximum Y size of the thumbnail. It can be smaller depending on the shape of the image

boolean $scalingup

Disable/Enable upscaling of previews

\OC\Files\View $fileview

fileview object of user folder

Returns

boolean|\OCP\IImage

false if no preview was generated