By Alexei Gorobets
asgorobets
* Technical Leader @ Propeople
* 3 years in Drupal
* Drupal Moldova Association co-founder
* Trainer
* Devs
* Site-builders
* Front-end devs
* PM
1. File management in Drupal in the past
2. Media module out of the box
3. Extending Media module
4. Alternatives
Hundreds of [field-type] CCK modules for
every provider (Youtube, Vimeo, S3)
Tens of duplicates, no code reuse and
developers inventing the wheel from scratch
No common approach and generic API for
developers to extend and work with
File field is in core! Yaaay!
* File Entity - fieldable and viewable files
* File Entity - fieldable and viewable files
* File types - Image, Document, Video, Audio
* File Entity - fieldable and viewable files
* File types - Image, Document, Video, Audio
* StreamWrappers
Core StreamWrappers
public://images/1.jpg
private://docs/restricted_file.pdf
temporary://docs/restricted_file.pdf
Contrib modules: (Remote files)
s3://images/1.jpg
dropbox://images/1.jpg
Make your own:
foobar://path/to/file/awesome.jpg
* Media widget (field widget)
* Media Wysiwyg
* Media Browser plugins
* Ability to write custom Media Browser
plugins
[[{"fid":"3","view_mode":"default","fields":
{"format":"default"},"type":"media","attributes":
{"class":"media-element file-default"}}]]
Demo
Media management in Drupal @Moldcamp

Media management in Drupal @Moldcamp