The media module is a huge step forward for Drupal. I think there should be the ability to create folders to organize content further. We work with photographers that have thousands of images organizing galleries in folders would improve the administrative experience greatly.

I also think that multiple file upload functionality should be enabled by default either via a flash uploader or via the jquery multiple file uploader.

Comments

Sebastian.Buesing’s picture

Hi,

as far as organizing media into folders goes I am currently working on a solution for just that. Should be fully finished by the end of the week. ;-)

Sebastian.Buesing’s picture

Assigned: Unassigned » Sebastian.Buesing
Status: Active » Needs review
StatusFileSize
new29.91 KB

Hi,

as promised I have created a patch for the media module to support folders (though I named it categories). I'm not sure which is better, but the categories act like folders would so maybe I should change it to folders.

Since this is my first official drupal contribution (*yeah*) I'd would love just every kind of feedback you guys can think of :-).

Also something I wanted to note is that this feature will be further extended in a way that the whole process process of organising media into folders/categories can be done via drag and drop.

In addttion to that there I'm also going to create a means to tag media and search media by tags. Now some tiny part of that is already in this patch, so feel free to comment on that too, but just not in way that this part of code isn't used yet ;-)

Well I hope I mentioned everything I should have and am looking forward to some feedback.

Greetings,
Sebastian

JacobSingh’s picture

Hi Sebastian,

Thank you for joining the effort! It's great to have someone like you on board to build new functionality on media. This patch is pretty large, so it might take me a long time to review it properly, but in spending 5 minutes on it, there are a couple fundamental things that need to change.

The biggest is the adding a column to file_managed. file_managed is a core table, and generally should not be modified. Yes, we add a field to it, and this is generally a really bad practice which we might eventually change, but I made a lengthy note there as to why I did it.

In the case of folders, what you really want to do is to add a field instance to each media entity of type "taxonomy term."

Also, I recommend you look at the media_browser_plus module (http://drupal.org/project/media_browser_plus). This module is intended to be a place we add more "heavyweight" components to media which not everyone will want. It has examples there which might apply to what you're doing. For instance, media_browser_plus adds a "title" field so media can have a name other than the filename. It also adds a "tags" field which is very similar to what you're doing, although there is no interface yet to filter by it.

Perhaps try to patch against that?

Also, I'd recommend starting with smaller, more digestible patches to make it easier to read and review. I know it's a pain to produce a huge patch only to have someone reject key parts of it. So start small to avoid this confusion.

Perhaps go into media_browser_plus and just write the code to add a "folder" vocabulary and then add that field to all media types when it is installed. Even a patch like that which doesn't do anything, will be a good starting point.

Another best practice if you're making big UI changes like you propose is to post screenshots / wireframes describing the changes you'd like to make first. This can avoid a lot of trouble down the road. Finally, this is OSS, so you are free to just create a new module doing it exactly the way you want and suggest changes to media which provide you the hooks you need, etc. But this should be a last resort. I can speak for all the maintainers when I say we're really excited to have this functionality, so if you have the time to go back and start with some screenshots and smaller patches in media_browser_plus, it would be awesome for the project.

Best,
Jacob

Sebastian.Buesing’s picture

Thanks for your input. I'll change it accordingly.

One question this raises though: If I put this into the media browser plus module, how should I proceed issue-wise?

Greetings,
Sebastian

JacobSingh’s picture

Hi Sebastian,

I think creating an issue in media_browser_plus, and adding mockups / screenshots would be a good way to start a discussion on the architecture.

Please link from this issue to that one and close this one out.

Best,
Jacob

Sebastian.Buesing’s picture

Status: Needs review » Closed (duplicate)

Hi,

moved here:

http://drupal.org/node/969010

Greetings,
Sebastian

effulgentsia’s picture

Thanks, Sebastian.

@justinlevi: You started this issue by mentioning multiple file upload as well. Media already supports integration with Plupload. Check it out, and if you find problems please open new issues in whichever project you think is responsible for the problem.