Copied to clipboard

Flag this post as spam?

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


  • Rune Grønkjær 1303 posts 2895 karma points
    May 28, 2013 @ 11:44
    Rune Grønkjær
    0

    IMedia SetValue with Stream always creates new file

    Hi Guys,

    I use Umbraco v6.0.3

    I'm trying to use the API to create and update media files. For this I create IMedia objects and use the SetValue method to add an "umbracoFile". I do this with the string, string, Stream overload.

    When I create the file for the first time, everything works fine and the file is created in the media folder.

    After that I do it again, trying to overwrite the file, but I get a new folder, with a new file and thumbnail, in the media folder. Now the file is there two times.

    Can i somehow force the API to overwrite the existing file, instead of creating new ones.

    Thanks

    /Rune

  • 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