Stable5 ocp files searchbymime

@karlitschek @VicDeo @bartv2 @icewind1991 backport to stable5 necessary for documents