Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
I have used Umbraco.MultipleMediaPicker for getting multiple images.
When I bind that property to the Model it gives me null value.
[UmbracoProperty("images", "images", false, null)] public List<string> SliderImagePathList { get; set; }
It gives me null list in the controller when I cast Model using ditto.
Can anyone help?
Thanks in advance.
Regards,
Urvish Mandaliya
Hi Urvish,
By default, the Umbraco.MultipleMediaPicker would return a string value (containing comma-separated media IDs).
Umbraco.MultipleMediaPicker
Which version of Ditto are you using? If it's 0.6.1, then you can use a built-in TypeConverter to handle the mapping.
[TypeConverter(typeof(MultipleMediaPickerConverter<string>))] [UmbracoProperty("images", "images", false, null)] public IEnumerable<string> SliderImagePathList { get; set; }
Cheers, - Lee
Hi Lee,
Thanks for the reply.
We are using 0.6.1 Ditto version.
We get below error while using above code.
No list value returns.
When we implement IEnumerable<string> and MultipleMediaPickerConverter<string> , we get the error of Children could not be evaluated.
IEnumerable<string>
MultipleMediaPickerConverter<string>
But IPublishedContent object have all the values of images.
Can you please help?
Thanks.
I think that is due to a bug in the converter. The next release definitely has that all fixed.
Thanks James for the reply.
Waiting for the next release.:)
Lee, is there any plan for new relase?
Very soon! We're testing out a new feature to make sure it is rock solid... then we'll do a v0.7.0 release. Hopefully early next week, (if not before) :-)
Thanks Lee for the prompt reply.
Looking forward for the release.:)
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Multiple media(images) value not getting in Model using Ditto
Hi,
I have used Umbraco.MultipleMediaPicker for getting multiple images.
When I bind that property to the Model it gives me null value.
It gives me null list in the controller when I cast Model using ditto.
Can anyone help?
Thanks in advance.
Regards,
Urvish Mandaliya
Hi Urvish,
By default, the
Umbraco.MultipleMediaPicker
would return a string value (containing comma-separated media IDs).Which version of Ditto are you using? If it's 0.6.1, then you can use a built-in TypeConverter to handle the mapping.
Cheers,
- Lee
Hi Lee,
Thanks for the reply.
We are using 0.6.1 Ditto version.
We get below error while using above code.
No list value returns.
Regards,
Urvish Mandaliya
Hi Lee,
When we implement
IEnumerable<string>
andMultipleMediaPickerConverter<string>
, we get the error of Children could not be evaluated.But IPublishedContent object have all the values of images.
Can you please help?
Thanks.
Regards,
Urvish Mandaliya
I think that is due to a bug in the converter. The next release definitely has that all fixed.
Thanks James for the reply.
Waiting for the next release.:)
Lee, is there any plan for new relase?
Regards,
Urvish Mandaliya
Very soon! We're testing out a new feature to make sure it is rock solid... then we'll do a v0.7.0 release.
Hopefully early next week, (if not before) :-)
Thanks Lee for the prompt reply.
Looking forward for the release.:)
is working on a reply...