Image Media Picker in Content Delivery API
# help-with-umbraco
s
I've started experimenting with the content delivery API in Umbraco 13 and it works great for the most part. However something I don't quite get is why the Image Media Picker (not with select multiple enabled) gives me an array instead of the object directly?
c
For sake of consistency of the response. The multiple-enabled option is handled in the back-end of Umrbaco, and whether if it's enabled or not best not influence the API response of the same property editor.
You are however able to create a custom implementation of the property editor converter incase whatever you are trying to connect the API to demands it to be an object instead of an array 🙂
s
Yeah I figured as much, it's not that much of a problem just wanted to know if it was for consistency purposes 🙂
m
I've just come across this, wondering why it returns as an array, when the interface explicity states that when the multi option is selected it will return as a ienumerable.
Bit new to content delivery api and property editor converters. Would someone be able to point me to the correct docs that show how this is done for v13 please? I only want to target those images that are returning as arrays not object and not affect every other image picker data type.
7 Views