Copied to clipboard

Flag this post as spam?

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


  • cchehn 27 posts 68 karma points
    22 days ago
    cchehn
    0

    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 882 posts 1643 karma points
    22 days ago
    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 27 posts 68 karma points
    22 days ago
    cchehn
    0

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

  • Robert J. Bullock 380 posts 398 karma points
    1 week ago
    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