Hi, I needed to add descriptions for media files on upload (similar to tags but a simple textfield), so here's a patch that works for my purposes. Untested on batch imports & browser filtering.

Should the description be saved in $file->description?

CommentFileSizeAuthor
media_browser_plus.description.patch6.62 KBbgilhome

Comments

brentratliff’s picture

If you don't want to have to track your patched version while continuing to upgrade, you can do all that in hook_FORM_ID_alter in a custom module. I did the same thing for a client.

Jackinloadup’s picture

Status: Needs review » Fixed

This is possible now with the latest code from Media 2.x and File_entity 2.x

Using the file_entity module you can add any fields to a file type like a description field.

After uploading a file you will be taken to the field edit screen with the latest dev releases.

This has been finished in #1426730: Automatically open the file edit modal after uploading a file

It's committed and will be in the next release of the Media 2.x branch.

If you want it now install Media 2.x-dev

brentratliff’s picture

Status: Fixed » Active

This is a separate issue. That patch applies a field to all uploaded entities in the same manner as the tags are assigned. It has the same effect for single file uploads but for multi-file uploads it opens a multi-form where you have to fill in the field for each individual entity. Right now, you still have to do this in a custom module to apply to all.

das-peter’s picture

From my perspective I don't think we should add this to the media browser plus module. At least not in such a non-generic way.
I really would like to add more of the media browser plus features to the media module itself and making this module obsolete.

Jackinloadup’s picture

+1 for #4 das-peter

pglynn’s picture

@brentratliff

Came across this after digging through the issues and forums for the Media Browser Plus module and I was wondering how you accomplished this with a custom module. I'm trying to do a similar thing (I need to add 6 different sets of tags to the image file type) and I've got the fields in there, but every time I upload a new file the tags aren't being saved. Do you think you could provide some code that would achieve this in a module?

brentratliff’s picture

@pglynn, I haven't looked at this in a while but check out the code here: http://drupal.org/sandbox/brentratliff/1592862. There were some enhancements to File Entity since I last looked at it so I'm not sure if my module will work anymore. I handed that project over.

salvis’s picture

Issue summary: View changes
Status: Active » Closed (outdated)