Copied to clipboard

Flag this post as spam?

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


  • Dibs 202 posts 991 karma points
    Jun 17, 2020 @ 10:09
    Dibs
    0

    Change media item url

    Dear Umbraco Team

    Im trying to update media item url. i can get the media Item umbracofile properties via

     IMedia mediaItem = mediaService.GetById(1227);
    var mediaItemProp = mediaItem.Properties;
    foreach (var mediaProp in mediaItemProp)
    {
        if (mediaProp.Alias == "umbracoFile")
        {
            foreach (var value in mediaProp.Values)
            {
                <h1>@value.EditedValue</h1>
            }
        }
    }
    

    but EditedValue is readonly. Is there another way to update media item url ?

  • Dibs 202 posts 991 karma points
    Jun 18, 2020 @ 08:44
    Dibs
    100

    Fixed by making use of mediaservices : )

  • 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.

Please Sign in or register to post replies