在Amazon S3中上传图像

I tried to upload an image in s3 using this tutorial https://florian.ec/articles/upload-files-to-amazon-s3-with-symfony2-and-gaufrette/ but I get the error: "The localhost page isn’t working" when I access this function : $uploader = $this->get('kdm_storage.photo_uploader');

      $uploader = $this->get('kdm_storage.photo_uploader');
    $uploadedUrl = $uploader->upload($logo);
    $t = $this->container->getParameter('amazon_s3_base_url') . $uploadedUrl;

services.xml

 <parameters>
    <parameter key="kdm_storage.photo_uploader.class">KDK\Controller\PhotoUploader</parameter>
</parameters>

<services>
    <service id="kdm_storage.photo_uploader" class="%kdm_storage.photo_uploader.class%">
        <argument type="service" id="photo_storage_filesystem" />
    </service>
</services>

config.yml

knp_gaufrette:
    adapters:
        photo_storage:
            amazon_s3:
                amazon_s3_id: kdm_storage.amazon_s3
                bucket_name:  %amazon_s3_bucket_name%
                create:       false
                options:
                    create: true
    filesystems:
        photo_storage:
            adapter:    photo_storage
            alias:      photo_storage_filesystem