Copied to clipboard

Flag this post as spam?

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


  • Jeremy 23 posts 72 karma points
    Mar 08, 2012 @ 00:51
    Jeremy
    0

    Bulk import of custom media types

    Hello,

    I am using a licensed version of pro v.2.1.1.

    I have a custom media type (for an image) with a few additional properties (captions, etc..)  I was under the impression CMSImport could import media items when I purchased a license.

    Now I am trying to import my media, and the only options when importing are for 'content' or 'members'.

    Is it possible to import media (without it being related to content)?  Essentailly I have all the images up on the server in the root, and my Excel file has the names of those files, along with the properties that need to be mapped to the properties I defined in my custom media type.

    If CMSImport doesn't support this, what are my other options?  I have 1,250 images each with 6 custom properties, looking to not have to manually enter this info.

    Thanks!

     

     

     

  • Richard Soeteman 4045 posts 12898 karma points MVP 2x
    Mar 08, 2012 @ 08:35
    Richard Soeteman
    0

    Hi Jeremy,

    CMSImport canm only import content and Members indeed, interesting how you would use it and I might support that in the future but I guess you don't have the time to wait that long.

    I think it's not that much to get it working for your situation. What I would do is create a dummy documenttype that has teh same properties as your media type. Only change the upload field to a media picker.

    Then use CMSImport to import against that document type and use an umbraco event to hook into the save event. in the save event get the media id of the imported image and then copy the property values of your content type over to your media type. 

    Does that makes sense?

    Thanks,

    Richard

  • Jeremy 23 posts 72 karma points
    Mar 08, 2012 @ 12:57
    Jeremy
    0

    Thanks Richard, I'll give it a shot using the Document.AfterSave event.

    Everything else with CMSImport has been great, I imported 1500 members and a variety of other doctypes without any issues.  I would recommend to anyone as it saves so much time.

    I guess I'm starting to doubt my logic in having the attributes define in a custom media type vs. just having a document with the attributes and associate that with an standard image.  I'll let you know how it works out.

     

     

     

     

     

  • Richard Soeteman 4045 posts 12898 karma points MVP 2x
    Mar 08, 2012 @ 13:04
    Richard Soeteman
    0

    Hi Jeremy great to hear that. And yes please let me know how it works out, having properties on a doctype might be a nice solution. Otherwise the event option might help you for now.

    Thanks,

    Richard

  • Jeremy 23 posts 72 karma points
    Mar 08, 2012 @ 14:45
    Jeremy
    0

    It seems to be working, but I was wondering how I can specify the media type being created during the import process as something other than 'Image'.  My 'CustomImage' has all the properties of the standard 'Image' as well as some additonal properties.  I'm just trying to keep things organized for my client, but if this is a large workaround I'll just stick with the standard 'image'.

  • Richard Soeteman 4045 posts 12898 karma points MVP 2x
    Mar 09, 2012 @ 10:11
    Richard Soeteman
    0

    Hi Jeremy,

    Yeah if you create an extra mediatype it doesn't work in the RTE might be better to have a single media type or content type as you suggested.

    Cheers,

    Richard

Please Sign in or register to post replies

Write your reply to:

Draft