Dear Joao,
You can refer below code:
DATA: lv_wrapper TYPE REF TO cl_bsp_wd_collection_wrapper,
lv_value_node TYPE REF TO if_bol_bo_property_access,
ls_vn_attr TYPE st_vdoc,
* get values from value node
lv_wrapper = typed_context->vdocument->get_collection_wrapper( ).
CHECK lv_wrapper IS BOUND.
lv_value_node = lv_wrapper->get_current( ).
CHECK lv_value_node IS BOUND.
lv_value_node->get_properties( IMPORTING es_attributes = ls_vn_attr ).
then using 'ls_vn_attr-filename' you will get file name and type.
Then u make your validation.
Thanks,
VIkas.