Currently Media is validating file types with it's own API (which looks up file types in it's own table). And if I understand correctly this is now deprecated and will be removed in favour of File Entity module.

I'm running into some obvious problems where I can't "upload" media entities of the type text through the media browser. I'm using media_internet in combination with oembed modules for this.

Here is a first small step in sorting out the media type validation.

I'd be happy to take a bigger stab at removing and cleaning out the whole media.type.inc, which if I understand correctly is more or less deprecated?

CommentFileSizeAuthor
media-file-validate-types-0.patch593 bytesdixon_

Comments

dixon_’s picture

Where can I find documentation or discussions around the goals/directions we have for media type handling? I guess we are moving towards letting File Entity module deal with all that? I see some out-commented code in Media module...

As I mentioned, I'd love to deal with this if I just can get some directions how much I can throw out from Media ;)

dave reid’s picture

Status: Needs review » Needs work

Unfortunately the options for this widget setting are controlled by media_type_get_types() so I don't think this is just as easy as swapping this out here. There are still some unknowns on 2.x with media.types.inc and file type handling so please don't move forward on removing that file until we can clear it up. Please join us in IRC for the Drupal media IRC meetings or office hours so we can discuss.

dixon_’s picture

Ok Dave, thanks for the clarifications. I'll drop by on IRC to see how I can help move this forward.

dixon_’s picture

Assigned: dixon_ » Unassigned
devin carlson’s picture

Status: Needs work » Fixed

I don't see any instances of media_get_type() in a fresh checkout of Media 7.x-2.x.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.