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?
| Comment | File | Size | Author |
|---|---|---|---|
| media-file-validate-types-0.patch | 593 bytes | dixon_ |
Comments
Comment #1
dixon_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 ;)
Comment #2
dave reidUnfortunately 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.
Comment #3
dixon_Ok Dave, thanks for the clarifications. I'll drop by on IRC to see how I can help move this forward.
Comment #4
dixon_Comment #5
devin carlson commentedI don't see any instances of
media_get_type()in a fresh checkout of Media 7.x-2.x.