Copied to clipboard

Flag this post as spam?

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


  • cchehn 28 posts 69 karma points
    Oct 23, 2018 @ 18:17
    cchehn
    0

    Change Media Type?

    Is there a package that adds a "Change Media Type" option to the Action Menu in Media? Something that operates like "Change Document Type" in the Content Action Menu?

    The background for this question is as follows... We created a custom Media Type called PublishedDocument by copying the File Media Type and adding a couple of properties "DisplayName" "DisplayPublishDate". Some of our users added files using the drag and drop upload and created a bunch of "File" Media Types.

    How can we convert these to PublishedDocument Media Types? DB, C# or Package suggestions are all welcome. This particular case extends the base File Media Type so we are not concerned about data loss.

  • Amir Khan 1287 posts 2744 karma points
    Oct 23, 2018 @ 21:15
    Amir Khan
    100

    You can use the MediaService API with the .GetMediaOfMediaType(int id) call then change it with some other method.

    I've never done it with media but have used the ContentService API to change document types, templates, etc.

    Hope this at least gets you started, here's some docs: https://our.umbraco.com/documentation/reference/management/services/mediaservice/

    -Amir

  • cchehn 28 posts 69 karma points
    Oct 24, 2018 @ 15:23
    cchehn
    0

    Thanks Amir! I will check this out and see if it solves my problem.

  • Robert J. Bullock 386 posts 405 karma points
    Nov 07, 2018 @ 17:27
    Robert J. Bullock
    0

    I was wondering the same thing...

    Related to the same question, if you have a child Media Type that inherits all of it's properties from it's parent type, is it "safe" to manually (i.e. in the db) switch the nodes to the child type? It's hard to imagine why it would not work but anyone have any insight on the question?

Please Sign in or register to post replies

Write your reply to:

Draft