
Multifile property - json
Hi,
I need to extract a multifile property with json. To do that I created an endpoint. In this endpoint I created a collection, existing of the multifile property.
To create Json, I put this in de template (the collection is called bijlagen):
[
{% for b in bijlagen %}
{"filename": "{{b}}"
{% if forloop.last == true %}
}
{% else %}
},
{% endif %}
{% endfor %}
]
I do get the URL from the files, but not the filename. Does anyone know how to add the filename to the json?
Corné
Hi,
I need to extract a multifile property with json. To do that I created an endpoint. In this endpoint I created a collection, existing of the multifile property.
To create Json, I put this in de template (the collection is called bijlagen):
[
{% for b in bijlagen %}
{"filename": "{{b}}"
{% if forloop.last == true %}
}
{% else %}
},
{% endif %}
{% endfor %}
]
I do get the URL from the files, but not the filename. Does anyone know how to add the filename to the json?
Corné
Login to reply