Empty Image problem using MeidaService to programaticaly create and Umbraco Media Image
Dear Umbraco folk,
The following code is working to create and "empty" image node in Umbraco BackOffice / Media section
var ms = ApplicationContext.Current.Services.MediaService;
var newImage = ms.CreateMedia(imageSourcePathPrimaryString, tTImagesFolderID, "Image");
ms.Save(newImage);
However - Then I am trying to "populate" that "empty" image node with an image and properties. To do this I am trying to use the following code:
Empty Image problem using MeidaService to programaticaly create and Umbraco Media Image
Dear Umbraco folk,
The following code is working to create and "empty" image node in Umbraco BackOffice / Media section
However - Then I am trying to "populate" that "empty" image node with an image and properties. To do this I am trying to use the following code:
But the image remains "empty" with no image to be seen and not Width, Height, Size or Type properties set.
Am I approaching this the right way ? Can anyone see what I might be doing wrong ?
Thanks all.
Terry Clancy ClanceZ
Never mind !
All I needed was a:
at the end of the code above - doh !!
Thanks anyway
Terry Clancy ClanceZ
is working on a reply...