I'm trying to get the Media node by Id using th MediaService. I would suppose it would something like this but it doen't work
var ms = Umbraco.Core.Services.MediaService; var m = ms.GetById(i); if (m != null) { var file = m.GetValue("umbracoFile"); url = (string)file; return url; } return @"\";
Get media node by id using MediaService
Hi
I'm trying to get the Media node by Id using th MediaService. I would suppose it would something like this but it doen't work
How can I do that?
/Paul S
ddd
Hi Paul,
Not sure what you are trying to achieve here. Anyways if you are using a Media Picker this should work
Hi
Eventually I would like to get the URL for the Image, but I cn't use Razor becuse it's backend code
/Paul S
is working on a reply...