Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Media files requires preapproved file extensions to be indexed #214

Open
stefanolsen opened this issue Oct 5, 2024 · 3 comments
Open

Media files requires preapproved file extensions to be indexed #214

stefanolsen opened this issue Oct 5, 2024 · 3 comments

Comments

@stefanolsen
Copy link

Using this plugin in Optimizely CMS, I would like to index the metadata of all media files, in order to be able to search for them in the asset pane.

However, I do not want to index the binary content of all media files, as attachment content. In the same way, I would like to index all MediaData instances without specifying all possible file extensions in configuration. This, I believe, should only be needed for attachment indexing.

Is it possible to not rely on file extensions when indexing MediaData instances? And instead rely exclusively on indexing conventions?

@otanum
Copy link
Contributor

otanum commented Oct 7, 2024

This is how it was designed. You have to specify all extensions that should be indexed and binary data for

        private static readonly string[] BinaryExtensions = new[]
        {
            "jpg", "jpeg", "gif", "psd", "bmp", "ai", "webp", "tif", "tiff", "ico", "jif", "png", "xcf", "eps", "raw", "cr2", "pct", "bpg",
            "exe", "zip", "rar", "7z", "dll", "gz", "bin", "iso", "apk", "dmp", "msi",
            "mp4", "mkv", "avi", "mov", "mpg", "mpeg", "vob", "flv", "h264", "m4v", "swf", "wmv",
            "mp3", "aac", "wav", "flac", "ogg", "mka", "wma", "aif", "mpa"
        };

are excluded automatically.

@otanum
Copy link
Contributor

otanum commented Oct 7, 2024

You could probably write you own GetFileTypes() in your solution and use IncludeFileType like

@BorgKristian
Copy link

We will not include this as part of the module. This can be resolved within the project as @otanum suggests above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants