Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi! Im testing Umbraco 8 and got stuck on getting files the way I'm used to.
I just made a simple loop to iterate through all folders and files in the media section but no files where found, only the folder..? I did this in a Partial view.
var DocRootFolder = Model.Parent.Value<Folder>("docFolder");
@foreach(var folder in DocRootFolder.Children)
@foreach(var doc in folder.Children)
I also tried to directly access an image just to see if I could get a hit but that gives me an error.
var mediaItem = Umbraco.TypedMedia(1234);
Are there any documentation ready for how to work with the media section?
I think Alex has answered this one before..
Yes, that is nice but now working for me in Umbraco 8.
"'UmbracoHelper' does not contain a definition for 'TypedMediaAtRoot' and no accessible extension method 'TypedMediaAtRoot' accepting a first argument of type 'UmbracoHelper' could be found (are you missing a using directive or an assembly reference?)"
I believe the current equivalent would be:
there is also
Just realized when testing that there were no problem with my initial code..
I deleted the pdf-files I uploaded and added them again and then they popped up! Strange!
So forget all I wrote :)
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted