Copied to clipboard

Flag this post as spam?

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


  • Sherry Ann Hernandez 320 posts 344 karma points
    Apr 28, 2011 @ 08:39
    Sherry Ann Hernandez
    0

    How to use media cache in the API

    I try using

    Media m = new Media(nodeID)

    and umbraco.library.GetMedia(nodeID)

    I'm still having a problem with the GetMedia as it is returning this text

    0-/media/11176/flora_grand_thumbnail.jpg60602551jpg

    I read that in the 4.5 media cache is already included. How can I use that?

  • Stefan Kip 1614 posts 4131 karma points c-trib
    Apr 28, 2011 @ 08:51
    Stefan Kip
    0

    var media = umbraco.library.GetMedia(id, false);
    if (media != null && media.Current != null)
    {
        media.MoveNext();
       
    return new MediaValues(media.Current);
    }

    From: http://shazwazza.com/post/Ultra-fast-media-performance-in-Umbraco.aspx

  • Sherry Ann Hernandez 320 posts 344 karma points
    Apr 28, 2011 @ 09:00
    Sherry Ann Hernandez
    0

    do you happened  to know the namespace for examine? I can't find it.

  • Sherry Ann Hernandez 320 posts 344 karma points
    Apr 28, 2011 @ 09:01
    Sherry Ann Hernandez
    0

    I found it...

Please Sign in or register to post replies

Write your reply to:

Draft