cloud_server.thumbnail_generator¶
Thumbnail generation for images and videos.
Classes
|
Generate thumbnails for images and videos. |
- class cloud_server.thumbnail_generator.ThumbnailGenerator(thumbnails_directory)[source]¶
Generate thumbnails for images and videos.
- __init__(thumbnails_directory)[source]¶
Initialize thumbnail generator.
- Parameters:
thumbnails_directory (
Path) – Directory to save generated thumbnails
- generate_thumbnail(filepath, mime_type, file_id, thumbnail_size)[source]¶
Generate thumbnail based on MIME type.
- Parameters:
- Raises:
FileExistsError – If a thumbnail already exists for the file
ValueError – If the MIME type is unsupported for thumbnail generation
- Return type: