IProviderV2

interface OCP\Preview\IProviderV2
Implemented by:OC\Preview\ProviderV2 OC\Preview\ProviderV1Adapter
Source:lib/public/Preview/IProviderV2.php#36

Methods

public OCP\Preview\IProviderV2::getMimeType()
Source:lib/public/Preview/IProviderV2.php#41
Returns:string Regex with the mimetypes that are supported by this provider
Since:17.0.0
public OCP\Preview\IProviderV2::isAvailable($file)
Check if a preview can be generated for $path
Source:

lib/public/Preview/IProviderV2.php#50

Parameters:
Returns:

bool

Since:

17.0.0

public OCP\Preview\IProviderV2::getThumbnail($file, $maxX, $maxY)
get thumbnail for file at path $path
Source:

lib/public/Preview/IProviderV2.php#61

Parameters:
  • $file (OCP\Files\File)
  • $maxX (int) The maximum X size of the thumbnail. It can be smaller depending on the shape of the image
  • $maxY (int) The maximum Y size of the thumbnail. It can be smaller depending on the shape of the image
Returns:

null | \OCP\IImage null if no preview was generated

Since:

17.0.0