Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-31912

URL prefix for IO not working properly

    XMLWordPrintable

    Details

    • Sprint:
      [3.2] - Sprint 7

      Description

      Description
      url_prefix setting does not work, the default value is always taken.

      Steps to reproduce
      1. Install eZ Platform 3.1
      2. Configure DFS 
      ezplatform.yaml:

      oneup_flysystem:
          adapters:
              aws_s3_adapter:
                  awss3v3:
                      client: aws.s3_client
                      bucket: '%env(AWS_S3_BUCKET)%'
                      prefix: '%env(DATABASE_NAME)%'
      
      # define the ez handlers
      ez_io:
          binarydata_handlers:
              aws_s3:
                  flysystem:
                      adapter: aws_s3_adapter
          metadata_handlers:
              dfs:
                  legacy_dfs_cluster:
                      connection: doctrine.dbal.default_connection
      
      ...
      
      ezplatform:
          system:
              default:
                  io:
                      binarydata_handler: aws_s3
                      metadata_handler: dfs
                      url_prefix: '%env(AWS_BASE_URL)%'
      
      

      services.yaml:

      services:
          aws.s3_client:
             class: Aws\S3\S3Client
             arguments:
                 - version: '2006-03-01' 
                   region: "eu-central-1" # 'eu-central-1' for example
                   credentials:
                       key: "aws-key"
                       secret: "aws-secret-key"
      
      

      Installing AWS SDK: http://aws.amazon.com/de/sdkforphp/ and league/flysystem-aws-s3-v3.

      Configure in .env file: 

      AWS_BASE_URL
      AWS_S3_BUCKET

      3. Setting url_prefix (see: https://doc.ezplatform.com/en/3.1/guide/file_management/#using-a-static-server-for-images)
      4. Add image

       

      Actual
      URL is not generated using url_prefix

      Expect:
      URL is generated using url_prefix

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              mateusz.debinski@ez.no Mateusz Dębiński
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: