public static function getByMimeType(?string $mimeType): int
    {
        switch (explode('/', (string) $mimeType)[0] ?? null) {
            case 'image':
                return static::IMAGE;
            case 'audio':
                return static::AUDIO;
            case 'video':
                return static::VIDEO;
            default:
                return static::FILE;
        }
    }