Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explain the differences between Media entities and File entities #37

Open
mariano-dagostino opened this issue Aug 9, 2016 · 2 comments

Comments

@mariano-dagostino
Copy link
Contributor

mariano-dagostino commented Aug 9, 2016

File entity provides interfaces for managing files. It also extends the core file entity, allowing files to be fieldable, grouped into types, viewed (using display modes) and formatted using field formatted.

vs

Media entity provides a 'base' entity for media. This is a very basic entity
which can reference to all kinds of media-objects (local files, YouTube
videos, Tweets, Instagram photos, ...). Media entity provides a relation between
Drupal and the media resource.

From those 2 descriptions from file_entity module and media_entity module, I may be hard for a site builder to decide whether to use a Fieldable entities or Media entities to achieve different use cases.

Take a look to the first 5 minutes of this video https://www.youtube.com/watch?v=vyav4VBuLng for more context.

@geek-merlin
Copy link

I'm just about modelling a complex site and torn between the 2 approaches, so let's share some notes:

  • While file-entity makes local files fieldable, media-entity has a reference to either a local file or a remote resource. So if you need or will need remote resources, media-entitiy is your only choice.
  • Both file and media allow for different bundles (thus fields) for different file types
  • File-entity is currently the only solution where you can bulk upload files of mixed types (BU)
  • Currently there seem more (media) file field formatters than file-url formatters (x)
  • Media has a plugin system to extract (thus denormalize) metadata to fields that has no correspondence for file-entities (x)

(x): Note: It might make sense to build bridges here.

My gut feeling is that most traction is going to the more generic media entities, so it might make sense to focus on this and cover the missing spots (like (BU) above).

@dreamfony
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants