Building a filter that checks the file extension is "complicated" (not complicated, more cumbersome):
- Eiher you must create your custom bean
- Or you must use a complicated EL such as:
(which of course is not good. A file named the file.docx.zip would pass the test)
So having something like currentDocument.getFileExtension() which returns "" if the blob is null or there is not file extension, and returns the lowercase file extension would be very nice. For fine tuning, the API could accept a parameter giving the xpath to test (file:content by default)
I understand that in the context of a filter, adding a getFileExtension() API means mainly adding it to DoocumentModel. But still. Would be useful and optimized.