Copied to clipboard

Flag this post as spam?

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


  • steven smith 20 posts 130 karma points
    Aug 12, 2014 @ 12:27
    steven smith
    0

    Deleting Umbraco Media

    Hey guys,

    Got an issue with the media folder.

    I deleted the images and folders in the media folder via the CMS.

    However when i did this the content pages were still attempting to find and use these images.

    so i removed any links from all the media pickers.

    Still had the issue, so i checked my code, and its still looking for the file.

    So this time i looked around and removed from the Recycle bin.  Still trying to find the ID.

    So then i looked through the Folder itself on window explorer, files were all there.....strange. so i deleted all of them. Guess what? still trying to search for the media.
    i checked my solution explorer,  Yeh you guessed it there still in there! so i deleted it from there too.

    So, deleted all media files, deleted all refrences, deleted all images in folders.

    there should be no references, no images.

    but guess what, i step through the following code, and somewhere in umbraco it still has the ID of the images.

    @if (Model.Content.GetPropertyValue("logo") != null)
    {
    var mediaItem = Umbraco.TypedMedia(Model.Content.GetPropertyValue("logo", true));
        <img class="img-logo" src="@mediaItem.GetPropertyValue("umbracoFile")" width="100" height="50" alt=""/>
    }

    Can someone please tell me what is going on?

    Additional information:

    I published my website and ftped it over to my dev server,  the DB did not move as my local copy and the dev copy now point to the same DB.  This was a test to see if the publish would work.

    when i used the site though none of the images where showing, although the images were there in the folders.
    I  looked around and found it weird.  So i decided to remove all images and references,  1st i deletd all folders in the cms. then i removed all references from the content.
    The rest as i said is all explained, no matter what i do its still trying to find these damn Images.

    Any help would be amazing as im completely stuck.

     

Please Sign in or register to post replies

Write your reply to:

Draft