I am using filefield to upload Google Earth kml/kmz files to my site and I want the links to these files to be displayed with the Google Earth icon. Currently filefield displays them with the 'application-octet-stream.png' icon. I have found how to change the default icons in filefield, but I can't find how to create a custom validator to associate the filetype with a custom icon.

I would be happy just to do this by validating the kml/kmz file extensions, but it would be better to validate the content too.

Can anyone give me some pointers how to achieve this? I am not a coder, although I may be able to work up a simple module if I can see some examples of something similar.