Copied to clipboard

Flag this post as spam?

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


  • Christo 23 posts 44 karma points
    Nov 18, 2010 @ 14:43
    Christo
    0

    Custom Folders not visible in the Desktop Media Uploader

    Hi guys, I'd like to know if there is a quick solution for following szenario:

    I'd ilke to create a documnet type "image folder" where only images can be added to (and image folders too). is for better structuring of the media data, since we have a project with many editors working on it.

    unfortunatelly if I create that "image folder" the media uploader won't see it and offer it for uploading item to.

     

    Any ideas?

     

    Thanks

    Chris

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Nov 18, 2010 @ 15:42
    Matt Brailsford
    0

    Hey Christo.

    They only thing I think would be possible (thought I'd need to add the functionality) is to allow you to define what Media Type is the "Folder" media type you want to use. The caveat to this is that it would be an all or nothing situation. Reason being, there is just no way to know what type of folder should be created. It's easy with the files, as it can just check the file extension, and use the configured Media Factories to decide who should create it.

    Only other way I can see it happening is to use an XPath statement to say, anything created in this folder, must use this folder type. A little more flexible than before, but still restrictive.

    I'll have to give it some more though, unless you have some ideas on how you see it being implemented?

    Cheers

    Matt

  • Christo 23 posts 44 karma points
    Nov 19, 2010 @ 16:03
    Christo
    0

    What about when you enable anything that is folder (status quo) and document types that are derived from "folder"?

    Then this would be flexible enough, since one can create a folder doc-type which is standalone and does not derive from "folder" and then it won't be visible in AIR, derived "folders" would be visible though.

    I think this should be even the easiest implementation, since you can cast folder sub-document types to "folder"

     

    What do you think?

     

    Cheers

    Christo

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Nov 19, 2010 @ 16:59
    Matt Brailsford
    0

    Hey Christo

    I'm not sure I understand when you say "derived"?

    In the Umbraco UI, you can't say whether a media type is "derived" from another, hence there is no way to say "this a folder derivitive". There is also the issue that, even if this was true, you may get it to show folders in the drop down list of locations to upload to, but if you were uploading a folder, it still wouldn't know what type of folder to create.

    Maybe I misunderstood what you meant?

    Many thanks

    Matt

  • Christo 23 posts 44 karma points
    Nov 19, 2010 @ 17:21
    Christo
    0

    you are absolutely right - media types cannot have children just like document types. sorry. (wondering why is this so tough?)

     

     

  • Joshua D. Stewart 34 posts 84 karma points
    Dec 16, 2010 @ 22:46
    Joshua D. Stewart
    0

    Hi all. Fantastic tool.

    I have a similar issue where I've created a custom image type with some extended properties, but I can't upload images using this Media Type. Would it be possible for you to add the ability to select what Media Type to use for an image/folder of images prior to upload?

    Thank you for the hard work.

    Regards,

    Josh

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Dec 17, 2010 @ 09:13
    Matt Brailsford
    0

    Hi Josh,

    You can actually do what you need already, you just need to write your own MediaFactory to tell it what to do with the media item, and register it in the /config/desktopmediauploader.config file (you can see an example of one of the default MediaFactories here http://dmu4umb.codeplex.com/SourceControl/changeset/view/fc4ccc769532#UmbracoFileMediaFactory.cs)

    The problem Christo is having is that he needs to create folders, which is what is not supported, as the MediaFactories work by checking the file extension of a posted file. But for your scenario, you should be fine to just create a MediaFactory.

    Cheers

    Matt

  • Joshua D. Stewart 34 posts 84 karma points
    Dec 17, 2010 @ 14:27
    Joshua D. Stewart
    0

    Fantastic!

    Thank you Matt.

    Regards,

    Josh

Please Sign in or register to post replies

Write your reply to:

Draft