Copied to clipboard

Flag this post as spam?

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


  • Dieter Luekens 4 posts 77 karma points
    Apr 12, 2019 @ 12:05
    Dieter Luekens
    0

    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?

  • Proxicode 128 posts 324 karma points
    Apr 13, 2019 @ 21:28
    Proxicode
    0

    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);
    
  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies