symfony - Sonata media bundle no image preview -


I have a problem in Sonata Media Bundle Images that I upload to the server (local) are not displayed (thumbnails Unavailable). I checked the path and it is all right that all my uploaded images have been moved to directory / web / upload / media .

Check the screenshot:

Enter image details here

Config file:

  Sonata_media: # if you do not use the default namespace configuration # Class: # Media: Myvendor \ MediaBundle \ Entity \ Media # Gallery: MyVendor \ MediaBundle \ Entity \ Gallery # gallery_has_media: MyVendor \ MediaBundle \ Entity \ GalleryHasMedia Default_Connect: Default db_driver: doctrine_orm # or doctrine_mongodb, doctrine_phpcr Reference: Default: #Default Reference Mandatory Prada These are: - Sonata.media.provider.dailymotion - sonata.media.provider.youtube - sonata.media.provider.image - sonata.media.provider.file Format: Preview: {Width: 100, Quality: 100} Small: {Width: 100, quality: 70} big: {width: 500, quality: 70} cd n: server: path: upload / media filesystem: local: directory:% kernel.root_dir% / .. / web / uploads / media Made: wrong sonata_notification: backend: sonata Notification. Backend. Runtime sonata_notification: admin: enabled: false  

Sonata is using the media bundle in the admin bundle and it all works well, but this thumbnail is not provided only. I have read the Media Bondol Doctor Helper Section, but I do not understand.

In my article, under the control of the admin, I am adding the following:

form field configured * * shown on the form / edit form field Has been / protected function configured form field ($ formMapper on formmap) {$ link_parameters = array (); If ($ this-> Happierfield Description ()) {$ link_parameters = $ this- & gt; GetParentFieldDescription () - & gt; GetOption ('link_parameters', array ()); } If ($ this-> hasyuist ()) {$ context = $ this- & gt; GetRequest () - & gt; Obtain ('context', blank); If (empty! == $ reference) {$ link_parameters ['context'] = $ reference; }} $ FormMapper-> Any solution ('media', 'sonata_type_model_list', array ('required' = & gt; wrong), array ('link_parameters' => gt; link_parameters))


Update:

In my log file, I found this:

[2015-01-22 15:28: 22 ] request. AIRR: Ancomer PHP Exception Symphony \ Contant \ htpkarnel \ Exception \ NotFoundHttpException: "GET / admin / sonata / media / media / uploads / media / default / 0001/01 / thumb_1_admin found no way" JPEG C: \ xampp \ Http: The path for /media/uploads/media/default/0001/01/thumb_1_admin.jpeg \ "C: \ xampp \ htdocs \ Symfony \ app \ cache \ dev \ classes.php has been found: 2017, symphony \ component \ Routing \ Exception \ ResourceNotFoundException ( Ud: 0): at: \ xampp \ htdocs \ Symfony \ app \ cache \ dev \ appDevUrlMatcher.php: 521) "} []

Your link should be something like '/ upload / media / ... and' upload '/ media / ...' '

< P> In your config file,

cdn: server: path: upload / media

in

cdn: server: path: / upload / media

Hope this helps to solve your problem.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -