I have written a media handler that handles xls and doc. However, to display the documents appropriately (e.g. with an appropriate icon), the getMediaDisplayHtml() should know which mime type the media has. Is there some way (or some function) to find that out? Or do I have to create a separate media handler for each extension?
Any help is appreciated.
Hi Chakal.
Thank you for your reply. Indeed, that PECL extension seems exactly what I need, and I will use it if there is no better solution.
A better solution could be if there were a function in Mediashare itself - that would be a lot faster because while Fileinfo would have to open the file to find out what it is, Mediashare already knows the mime type and probably stores it somewhere. But I don't know how if there is a Mediashare function that gives back the mime type.