Amazon_S3_And_CloudFront::get_s3_url_prefix PHP Method

get_s3_url_prefix() public method

Get the region specific prefix for S3 URL
public get_s3_url_prefix ( string $region = '', null | integer $expires = null ) : string
$region string
$expires null | integer
return string
    function get_s3_url_prefix($region = '', $expires = null)
    {
        $prefix = 's3';
        if ('' !== $region) {
            $delimiter = '-';
            if ('eu-central-1' == $region && !is_null($expires)) {
                // if we are creating a secure URL for a Frankfurt base file use the alternative delimiter
                // http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
                $delimiter = '.';
            }
            $prefix .= $delimiter . $region;
        }
        return $prefix;
    }
Amazon_S3_And_CloudFront