Copied to clipboard

Flag this post as spam?

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


  • Andreas Iseli 150 posts 427 karma points
    Mar 20, 2013 @ 16:33
    Andreas Iseli
    0

    Media vs Media in v6

    I'm currently a bit confused regarding the media types in v6 (or even 4.10+). I'd like to use the uQuery component to access the cached version instead of using the IMediaServices which seems to not be cached (am I right or not ?). I'm aware of the examine possibilities, but thats not the way I'd like to go.

    Unfortunately the Media type returned by uQuery is obsolete. But using the XPathNodeIterator directly seems still to be fine. Can someone tell me what we now can or should use to access media?

  • Andreas Iseli 150 posts 427 karma points
    Mar 20, 2013 @ 20:31
    Andreas Iseli
    0

    I've ended up using 

    umbracoHelper.TypedMedia(mediaId);

    If anyone has any opinion about the throusands way of getting a media file, then just tell me. What I'm doing is getting all descending images of selected media folder structure.

  • Andreas Iseli 150 posts 427 karma points
    Mar 20, 2013 @ 20:34
    Andreas Iseli
    0

    Something similar. Can someone tell me why this code returns each image file twice?

    return media.Descendants().Where(m => !string.IsNullOrEmpty(m.GetPropertyValue<string>("umbracoFile"))).OrderByDescending(m => m.CreateDate).Take(5);
  • Andreas Iseli 150 posts 427 karma points
    Mar 23, 2013 @ 10:27
    Andreas Iseli
    100

    Well I ended up using the MediaService in v6. It is many times faster than any of the other methods.

Please Sign in or register to post replies

Write your reply to:

Draft