diff options
author | Robin Appelman <robin@icewind.nl> | 2020-02-16 01:45:47 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2020-04-09 12:50:55 +0200 |
commit | 5cd12cd7c39c2ea156ab35266c9359cdd0f4c070 (patch) | |
tree | 47c65715b84db981b59ef3247dbc456ad32e54dc /lib/public/IPreview.php | |
parent | 981278a666370ce40d144ea8d7783e712605c1c0 (diff) | |
download | nextcloud-server-5cd12cd7c39c2ea156ab35266c9359cdd0f4c070.tar.gz nextcloud-server-5cd12cd7c39c2ea156ab35266c9359cdd0f4c070.zip |
allow generating multiple preview sizes for a single file at once
this saves having to do some of the overhead multiple times
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/public/IPreview.php')
-rw-r--r-- | lib/public/IPreview.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/public/IPreview.php b/lib/public/IPreview.php index b377d285acb..164cbbac2bf 100644 --- a/lib/public/IPreview.php +++ b/lib/public/IPreview.php @@ -115,4 +115,17 @@ interface IPreview { * @since 8.0.0 */ public function isAvailable(\OCP\Files\FileInfo $file); + + /** + * Generates previews of a file + * + * @param File $file + * @param array $specifications + * @param string $mimeType + * @return ISimpleFile the last preview that was generated + * @throws NotFoundException + * @throws \InvalidArgumentException if the preview would be invalid (in case the original image is invalid) + * @since 19.0.0 + */ + public function generatePreviews(File $file, array $specifications, $mimeType = null); } |