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
mediaImage.SetValue("umbracoFile", stream); ms.Save(mediaImage);
Unfortunately, saving images with the SetValue("umbracoFile", stream ) does not work? Do anyone have an idea, why not?
Untested code, but I wonder if you first created the image with something like...
var mediaImage = ms.CreateMedia(fileName, parentId, "Image"); mediaImage.SetValue("umbracoFile", stream); ms.Save(mediaImage);
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
CreateMedia MemoryStream
mediaImage.SetValue("umbracoFile", stream); ms.Save(mediaImage);
Unfortunately, saving images with the SetValue("umbracoFile", stream ) does not work? Do anyone have an idea, why not?
Untested code, but I wonder if you first created the image with something like...
is working on a reply...