Copied to clipboard

Flag this post as spam?

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


  • gluc86 23 posts 123 karma points
    Jun 11, 2013 @ 22:15
    gluc86
    0

    Create MediaType in Umbraco 6

    Hello,

    I try to migrate my package umbraco 4 to umbraco 6.

    Before i used this code :

    MediaType mType = MediaType.MakeNew('userCourant', 'name');
    

    mType.Alias = 'alias';

    mType.Thumbnail = "docWithImage.png";

    mType.IconUrl = "Media File";

    mType.Save();

    But now it doesn't work in umbraco 6.

    Do you know how to do for create a new MediaType in my package ?

    In code C# or in package.xml ?

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Jun 12, 2013 @ 17:39
    Dave Woestenborghs
    100

    In Umbraco 6 you can use the new media service to create media.

    http://our.umbraco.org/documentation/Reference/Management-v6/Services/MediaService

    Dave

  • gluc86 23 posts 123 karma points
    Jun 12, 2013 @ 22:03
    gluc86
    0

    Thank you.

    It's OK.

Please Sign in or register to post replies

Write your reply to:

Draft