MediaHandler.php: add file kind

This commit is contained in:
Zankaria 2025-03-18 11:51:18 +01:00
parent 3eca4bccc0
commit 9c09d495d8

View file

@ -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.