Forums / Setup & design / Get file/image mime type from a fetched node
Softriva .com
Sunday 25 February 2007 3:29:58 am
How to get the file/image mime type from a fetched node. I mean how do I know if the file is pdf or doc or jpg or gif
Claudia Kosny
Monday 26 February 2007 3:20:17 am
Hi OOzy
The content of the an attribute of type file is an ezbinaryfile object which has the property mime_type. See also here http://ez.no/doc/ez_publish/technical_manual/3_8/reference/objects/ezbinaryfile
Thus you should be able to fetch the mimetype like this (not tested...){$node.data_map.file_attribute.content.mime_type}
Claudia