Copied to clipboard

Flag this post as spam?

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


  • Anton 135 posts 186 karma points
    Feb 14, 2012 @ 11:15
    Anton
    0

    Add image in existing folder by Umbraco API

    I create media folder 

    Media contentFolder = Media.MakeNew( doc.Id.ToString(), MediaType.GetByAlias("folder"),author , 1072);       

    How I can  Add image in existing folder by Umbraco API?

  • Stefan Kip 1614 posts 4131 karma points c-trib
    Feb 14, 2012 @ 11:34
  • Mike Chambers 636 posts 1253 karma points c-trib
    Feb 14, 2012 @ 11:38
    Mike Chambers
    0
    Media m =Media.MakeNew(imageName,MediaType.GetByAlias("image"),User.GetUser(0),1072);

    the last parameter is the ParentId for the new media item...

  • Stefan Kip 1614 posts 4131 karma points c-trib
    Feb 14, 2012 @ 11:53
    Stefan Kip
    0

    @Mike
    That's not the complete solution. Creating an item in umbraco is one thing, but storing an image with thumbnail and setting all the properties is the second thing, which is described in the link I've provided. 

  • Mike Chambers 636 posts 1253 karma points c-trib
    Feb 14, 2012 @ 12:00
    Mike Chambers
    0

    misread, thought was just a request to how to have a media item nested in an exisintg medianode folder...

  • Anton 135 posts 186 karma points
    Feb 14, 2012 @ 12:14
    Anton
    0

    I have images. I only want to upload it in existing folder by Umbraco API.  Can I do such think?

  • 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