Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Robin Neal 2 posts 93 karma points
    Apr 13, 2017 @ 10:06
    Robin Neal
    1

    Accessing Media in Umbraco 7.6

    tl;dr: How can I get a media IPublishedContent object from a UDI/GUID in Umbraco 7.6rc?

    We've recently updated our most recent project to Umbraco 7.6, which has been great for the most part. However it seems that we're having some issues getting everything working again with the new UDI implementation.

    Our setup involves using the property converter with the models builder to generate our models. Unfortunately, the MultipleMediaPicker property converter appears to have broken due to the 7.6 changes.

    Whereas before the property converter had to convert int IDs into media, it now has to convert UDIs into media items. I've updated our property converter's ConvertDataToSource method to handle UDIs, however I can't seem to get the media item in the ConvertSourceToObject method.

    It appears that, unlike TypedContent, the TypedMedia method doesn't have any overloads accepting a GUID. Without this I'm not sure how we can actually retrieve a media item, unless there's a new undocumented method I'm unaware of. I've tried trawling through the source, but I think I'm reaching the limits of my front end developer abilities!

    Has anyone else encountered this problem? Is there a new method for accessing media within Umbraco 7.6 that I need to be aware of?

    Thanks in advance!

  • Robin Neal 2 posts 93 karma points
    Apr 20, 2017 @ 16:27
    Robin Neal
    100

    Just in case anyone ends up here, this turned out to be a bug in the RC for 7.6, more details over here:

    http://issues.umbraco.org/issue/U4-7318

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

    Continue discussion

Please Sign in or register to post replies