Explorar el Código

Fix WebPath in src image

Andrea Sosso hace 11 años
padre
commit
159479bab8
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      Resources/doc/cookbook/recipe_image_previews.rst

+ 1 - 1
Resources/doc/cookbook/recipe_image_previews.rst

@@ -61,7 +61,7 @@ we are manipulating form fields we do this from within ``ImageAdmin::configureFo
                 $fullPath = $container->get('request')->getBasePath().'/'.$webPath;
             
                 // add a 'help' option containing the preview's img tag
-                $fileFieldOptions['help'] = '<img src="'.$webPath.'" class="admin-preview" />';
+                $fileFieldOptions['help'] = '<img src="'.$fullPath.'" class="admin-preview" />';
             }
             
             $formMapper