LPS-45067 Apply same fix as we have in WikiPageLocalServiceImpl.addPageAttachments. By doing this we try to obtain the mimeType not only from the title but also from the content of file.