Filter images from attachments live data

Is there a way to exclude certain MIME Types from showing up in the attachments?

I already tried my luck with the given filter options, but to no avail. Is it somehow possible to filter for ‘not equal’?

In older XWiki versions I achieved this by adding a CSS-Class and hiding certain rows. With the new live data this approach doesn’t work anymore.

Also, filters seem to be added with AND operator? In the screenshot there should be entries in the table but since I filtered for ‘PDF’ the empty ones don’t show up anymore.

2023-02-21 19_21_05-Window

Hello @Pako.

The not equal and OR operator are currently not supported in the LiveData UI.

What’s preventing you to do this? Wouldn’t a selection on .attachmentMimeType [title='PDF'] work for you?

Interestingly, I don’t obtain the same result, see the screenshot below. I’ve uploaded a pdf and an image in the page. What’s the version of XWiki you are using?

Thanks for your reply @mleduc

What’s preventing you to do this? Wouldn’t a selection on .attachmentMimeType [title='PDF'] work for you?

I tried but the selector only selects the ‘mimeType’ table cell not the entire table row.

Unfortunately, the row itself has no CSS class and I could’t figure out which template contains the code for the row.

My old method was to encapsulate and hide image rows in a div based on #if ($attachment.isImage()) inside the attachment_macros.vm