Forums / Developer / how can I check if a file object (datatype file) is empty?

how can I check if a file object (datatype file) is empty?

Author Message

Jens Tiedemann

Tuesday 04 March 2008 4:50:54 am

{if $node.data_map.related_file.filename.is_empty|not}

always seem to return True....

Stéphane Bullier

Tuesday 04 March 2008 5:18:22 am

Hi,

You can use :
{if $node.data_map.related_file.has_content}
true
{else}
false
{/if}

Stéphane