Nextcloud PHP API (stable18)

IProviderV2

Tags
since
17.0.0

Table of Contents

getMimeType()  : string
getThumbnail()  : null|IImage
get thumbnail for file at path $path
isAvailable()  : bool
Check if a preview can be generated for $path

Methods

getMimeType()

public getMimeType() : string
Tags
since
17.0.0
Return values
string

Regex with the mimetypes that are supported by this provider

getThumbnail()

get thumbnail for file at path $path

public getThumbnail(File $file, int $maxX, int $maxY) : null|IImage
Parameters
$file : 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

Tags
since
17.0.0
Return values
null|IImage

null if no preview was generated

isAvailable()

Check if a preview can be generated for $path

public isAvailable(FileInfo $file) : bool
Parameters
$file : FileInfo
Tags
since
17.0.0
Return values
bool

Search results