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

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

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