src/Kunstmaan/MediaBundle/Helper/File/PdfHandler.php
public function setMediaPath($kernelRootDir)
    {
        parent::setMediaPath($kernelRootDir);

        $this->setWebPath(realpath(str_replace('/', DIRECTORY_SEPARATOR, $kernelRootDir . '/../web/')) . DIRECTORY_SEPARATOR);
    }
public function setMediaPath($kernelRootDir)
    {
        parent::setMediaPath($kernelRootDir);

        $this->setWebPath(realpath(str_replace('/', DIRECTORY_SEPARATOR, $kernelRootDir . '/../web/')) . DIRECTORY_SEPARATOR);
    }
public function setMediaPath ( $ kernelRootDir ) { parent :: setMediaPath ( $ kernelRootDir ) ; $ this -> setWebPath ( realpath ( str_replace ( '/' , DIRECTORY_SEPARATOR , $ kernelRootDir . '/../web/' ) ) . DIRECTORY_SEPARATOR ) ; }
Inject the root dir so we know the full path where we need to store the file.

@param string $kernelRootDir
Inject the root dir so we know the full path where we need to store the file .