diff --git a/inc/Service/Media/MediaHandler.php b/inc/Service/Media/MediaHandler.php index f668e35e..cf61ffce 100644 --- a/inc/Service/Media/MediaHandler.php +++ b/inc/Service/Media/MediaHandler.php @@ -5,9 +5,27 @@ use Vichan\Data\ThumbGenerationResult; interface MediaHandler { + /** + * PHP file upload, + */ + public const FILE_KIND_UPLOADED = 0; + /** + * Temporary file that should be moved/copied elsewhere. + */ + public const FILE_KIND_TEMPORARY = 1; + /** + * Static vichan file. + */ + public const FILE_KIND_STATIC = 2; + /** + * Live file in use by vichan in some post. + */ + public const FILE_KIND_INSTALLED = 3; + + public function supportsMime(string $mime): bool; - public function openHandle(string $file_path, string $file_mime): mixed; + public function openHandle(string $file_path, string $file_mime, int $file_kind): mixed; /** * Generates a thumbnail from the given file.