media management in drupal @moldcamp
TRANSCRIPT
By Alexei Gorobetsasgorobets
* 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 past2. Media module out of the box3. Extending Media module4. 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 StreamWrapperspublic://images/1.jpgprivate://docs/restricted_file.pdftemporary://docs/restricted_file.pdf
Contrib modules: (Remote files)s3://images/1.jpgdropbox://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