src/PHPDish/Bundle/MediaBundle/Controller/MediaController.php
protected function getUploaderAndBuilder(Request $request)
    {
        if ($configKey = $request->headers->get('media_mapping')) {
            $uploader = $this->get('phpdish_media.file_uploader.' . $configKey);
            $urlBuilder = $this->get('phpdish_media.url_builder.' . $configKey);
        } else {
            $uploader = $this->get('phpdish_media.file_uploader');
            $urlBuilder = $this->get('phpdish_media.url_builder');
        }
        return [$uploader, $urlBuilder];
    }
protected function getUploaderAndBuilder(Request $request)
    {
        if ($configKey = $request->headers->get('media_mapping')) {
            $uploader = $this->get('phpdish_media.file_uploader.' . $configKey);
            $urlBuilder = $this->get('phpdish_media.url_builder.' . $configKey);
        } else {
            $uploader = $this->get('phpdish_media.file_uploader');
            $urlBuilder = $this->get('phpdish_media.url_builder');
        }
        return [$uploader, $urlBuilder];
    }
获取上传处理器和url构建
@param Request $request
@return array