sonata_media.yml 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. sonata_media:
  2. class:
  3. media: Chamilo\MediaBundle\Entity\Media
  4. gallery: Chamilo\MediaBundle\Entity\Gallery
  5. gallery_has_media: Chamilo\MediaBundle\Entity\GalleryHasMedia
  6. category: Chamilo\ClassificationBundle\Entity\Category
  7. db_driver: doctrine_orm # | doctrine_mongodb
  8. default_context: default
  9. contexts:
  10. default: # the default context is mandatory
  11. download:
  12. mode: http # X-Sendfile | http
  13. providers:
  14. - sonata.media.provider.dailymotion
  15. - sonata.media.provider.youtube
  16. - sonata.media.provider.image
  17. - sonata.media.provider.file
  18. - sonata.media.provider.vimeo
  19. formats:
  20. small: { width: 100, quality: 100}
  21. big: { width: 970 , quality: 100}
  22. course:
  23. providers:
  24. - sonata.media.provider.dailymotion
  25. - sonata.media.provider.youtube
  26. - sonata.media.provider.image
  27. - sonata.media.provider.file
  28. - sonata.media.provider.vimeo
  29. formats:
  30. small: { width: 100, quality: 100}
  31. big: { width: 970 , quality: 100}
  32. news:
  33. providers:
  34. - sonata.media.provider.dailymotion
  35. - sonata.media.provider.youtube
  36. - sonata.media.provider.image
  37. formats:
  38. abstract: { width: 100, quality: 100}
  39. wide: { width: 820, quality: 100}
  40. sonata_collection:
  41. providers:
  42. - sonata.media.provider.image
  43. formats:
  44. preview: { width: 100, quality: 100}
  45. wide: { width: 820, quality: 100}
  46. sonata_category:
  47. providers:
  48. - sonata.media.provider.image
  49. formats:
  50. preview: { width: 100, quality: 100}
  51. wide: { width: 820, quality: 100}
  52. user:
  53. providers:
  54. - sonata.media.provider.image
  55. formats:
  56. small: { width: 100, quality: 100}
  57. big: { width: 970 , quality: 100}
  58. cdn:
  59. # define the public base url for the uploaded media
  60. server:
  61. path: %url_append%%sonata_media.cdn.host%
  62. filesystem:
  63. # define where the uploaded file will be stored
  64. local:
  65. directory: %kernel.root_dir%/../web/uploads/media
  66. create: true
  67. providers:
  68. # ...
  69. file:
  70. # the resizer must be set to false, otherwhise this can delete icon files from the fs
  71. resizer: false
  72. image:
  73. thumbnail: sonata.media.thumbnail.format # default value
  74. # thumbnail: sonata.media.thumbnail.consumer.format # can be used to dispatch the resize action to async task
  75. # thumbnail: sonata.media.thumbnail.liip_imagine # use the LiipImagineBundle to resize the image
  76. vimeo:
  77. thumbnail: sonata.media.thumbnail.format # default value
  78. # thumbnail: sonata.media.thumbnail.consumer.format # can be used to dispatch the resize action to async task
  79. # thumbnail: sonata.media.thumbnail.liip_imagine # use the LiipImagineBundle to resize the image
  80. youtube:
  81. thumbnail: sonata.media.thumbnail.format # default value
  82. # thumbnail: sonata.media.thumbnail.consumer.format # can be used to dispatch the resize action to async task
  83. # thumbnail: sonata.media.thumbnail.liip_imagine # use the LiipImagineBundle to resize the image
  84. dailymotion:
  85. thumbnail: sonata.media.thumbnail.format # default value
  86. # thumbnail: sonata.media.thumbnail.consumer.format # can be used to dispatch the resize action to async task
  87. # thumbnail: sonata.media.thumbnail.liip_imagine # use the LiipImagineBundle to resize the image
  88. pixlr:
  89. enabled: true
  90. referrer: App
  91. resizer:
  92. simple:
  93. # mode: outbound
  94. mode: inset
  95. #
  96. # The LiipImagineBundle can be used if you want to convert on demand an image
  97. # to a specific format. (ie a controller render the file)
  98. # more information can be found here : https://github.com/liip/LiipImagineBundle
  99. #
  100. #liip_imagine:
  101. # filter_sets:
  102. #
  103. # # this configuration match the sonata_media configuration format definition
  104. # sonata_product_preview:
  105. # quality: 75
  106. # controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
  107. # filters:
  108. # thumbnail: { size: [100, 100], mode: outbound }
  109. #
  110. # sonata_product_small:
  111. # quality: 75
  112. # controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
  113. # filters:
  114. # thumbnail: { size: [200, 100], mode: outbound }
  115. #
  116. # sonata_product_large:
  117. # quality: 75
  118. # controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
  119. # filters:
  120. # thumbnail: { size: [600, 100], mode: outbound }
  121. #
  122. # news_abstract:
  123. # quality: 75
  124. # controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
  125. # filters:
  126. # thumbnail: { size: [100, 100], mode: outbound }
  127. #
  128. # news_wide:
  129. # quality: 75
  130. # controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
  131. # filters:
  132. # thumbnail: { size: [820, 100], mode: outbound }
  133. #
  134. # sonata_collection_preview:
  135. # quality: 75
  136. # controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
  137. # filters:
  138. # thumbnail: { size: [100, 100], mode: outbound }
  139. #
  140. # sonata_collection_wide:
  141. # quality: 75
  142. # controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
  143. # filters:
  144. # thumbnail: { size: [820, 100], mode: outbound }
  145. #
  146. # sonata_category_preview:
  147. # quality: 75
  148. # controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
  149. # filters:
  150. # thumbnail: { size: [100, 100], mode: outbound }
  151. #
  152. # sonata_category_wide:
  153. # quality: 75
  154. # controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
  155. # filters:
  156. # thumbnail: { size: [820, 100], mode: outbound }
  157. #
  158. # default_small:
  159. # quality: 75
  160. # controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
  161. # filters:
  162. # thumbnail: { size: [100, 100], mode: outbound }
  163. #
  164. # default_big:
  165. # quality: 75
  166. # controller_action: 'SonataMediaBundle:Media:liipImagineFilter'
  167. # filters:
  168. # thumbnail: { size: [820, 70], mode: outbound }