Copied to clipboard

Flag this post as spam?

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


  • nelsenlim 70 posts 71 karma points
    Sep 28, 2011 @ 09:32
    nelsenlim
    0

    Multiple FIle Upload 4.7.1 issue, media children return 0

    Please refer to: http://our.umbraco.org/forum/developers/razor/24348-umbraco-razor-471-media-with-Id-0

    Hi in umbraco 471 when running the code to loop for image inside a folder, i receive a children where the Id is 0
    I always get this even when i am looping an empty folder

    @inherits umbraco.MacroEngines.DynamicNodeContext
    @if (Model.HasProperty("media") && Model.media != 0)
    {
        var folder = @Model.Media("media");
        foreach (var image in folder.Children)
        {
            <span>@image.Id</span>
            <img src="@image.umbracoFile" height="@image.umbracoHeight" width="@image.umbracoWidth" />
        }
    }

    This issue only appears if i install MultipleFileUpload that's why i have to add in my razor script some filtering
    folder.Children.Where("Id > 0") which is quite annoying.
    This only happens to news folders created after MultipleFileUpload package installation in umbraco 4.7.1

Please Sign in or register to post replies

Write your reply to:

Draft