Copied to clipboard

Flag this post as spam?

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


  • Zachary Allen 14 posts 85 karma points
    Sep 28, 2013 @ 07:24
    Zachary Allen
    0

    Change Media Type of existing media nodes

    I have about 2,000 existing media nodes that I need to change to a new type

    I'm Running Umbraco v6.1.3 (Assembly version: 1.0.4954.19342)

    I have 2 custom media types, OldVideo, and Newvideo

    I need to run a scrip to update every OldVideo node to New Video node, and move over a few properties.

    My question is does the API have a way to change a media node's currently existing media type, to another currently existing media type

    Or should this be done directly in the database, and not though the API? If it has to be done in the Database, how do I save the properties already on the OldVideo media type?

    Thanks for any help you can provide!

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Sep 28, 2013 @ 09:05
    Dirk De Grave
    0

    i'm pretty sure you can't! you could create a simple page that can be run in the backoffice and iterate your old media and create a media item of new type for each of the old media items, including copying over the properties.

     

    Cheers,

    /Dirk

  • Zachary Allen 14 posts 85 karma points
    Sep 28, 2013 @ 09:17
    Zachary Allen
    0

    Thanks for the input, I was worried that would be the answer.

    Currently the Old media types are attached to Content nodes, would there be a way to search though the Content nodes for the Old Media ID, and replace it with the new Media ID?

Please Sign in or register to post replies

Write your reply to:

Draft