Skip to content

Bundle to abstract the process of storing and retrieving media files (FlySystem version)

Notifications You must be signed in to change notification settings

nediam/OryzoneMediaStorageBundle

 
 

Repository files navigation

MediaStorageBundle

MediaStorageBundle is a Symfony2 bundle that aims to provide a solid, extendible infrastructure to handle media storage and retrieval. It's built for Doctrine2 and allows to store files (simple files, images, videos, documents) and related metadata as Doctrine entities (Doctrine ORM) or documents (Doctrine ODM). It internally adopt Gaufrette to abstract the filesystem and allows to store files on many external filesystem like Amazon and Rackspace or through FTP or SFTP. It is freely inspired to some famouse Symfony2 media management bundles such as SonataMediaBundle, AnoMediaBundle and VichUploaderBundle but it introduces several different peculiarities and tries to be more extensible and configurable.

WARNING: This bundle version (2.0) is still experimental. It's heavily untested and undocumented, so please do not use it in production. If you prefer a more stable release checkout the 1.0 version at the master branch.

Providers

MediaStorageBundle is based on the concept of provider. A provider is a way to abstract the logic behind a certain type of media. The bundle offers a series of default providers to store the following media types (and their metadata):

  • Files
  • Images (that can be automatically stretched, shrunk, cropped and converted)
  • Youtube and Vimeo videos (preview image is locally downloaded and che be elaborated as an image)

So if your environment is built on top of Symfony2/Doctrine2 need to work with external files, images, and online videos (Youtube/Vimeo) the bundle should offer everything you need to get the job done. If you need some custom logic (e.g. video conversion, pdf preview generation, etc.) you can easily implement your custom provider.

Installation

As every Symfony 2.1 bundle, MediaStorageBundle can be installed through Composer. Just add the following dependency inside the require block of your composer.json file:

"oryzone/media-storage-bundle": "2.0.x-dev"

So tell composer to download and install the new bundle:

php composer.phar update oryzone/media-storage-bundle

Then you must enable the bundle in your AppKernel.php file by adding the following line in your $bundles array:

new \Oryzone\Bundle\MediaStorageBundle\OryzoneMediaStorageBundle(),

Configuration

Refer to the documentation

Dependencies

To install the optional dependencies please refer to the official documentation of each bundle.

Documentation

Full documentation (still incomplete) is available here: /Resources/doc/index.rst

Contribution

Contributions are always welcome! If you need to report a bug you can use the github issues for the repository (please specify that it's referred to the version 2 of the bundle). Otherwise you can easily introduce new features, improvements or fixes by forking the repository and submitting a pull request. This list provides the next thing Oryzone would like to implement in the bundle. So if you want to contribute and don't know where to begin here's some hints ;)

  • PhpUnit tests
  • Travis CI integration
  • Improve documentation
  • Build providers for famous external services like DailyMotion, Twitter, SlideShare, etc...
  • Integrate different ways of processing media (on demand and background)

Thanks

About

Bundle to abstract the process of storing and retrieving media files (FlySystem version)

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%