WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Amazon S3 Plugin
Ability to use CNAME for files (1 post)

  1. unca-joe
    Member
    Posted 3 years ago #

    I wanted to use a CNAME address for my S3 urls and found a simple solution. First I created a bucket named images.MyDomain.com then added the CNAME images through DNS and pointed it to that bucket, images.MyDomain.com.s3.amazonaws.com.

    Now all uploaded images urls would be available in the http://images.MyDomain.com/2010/10/image.png format.

    To get the plugin to utilize the new url format I changed Line 215 in wp-s3/s3.php from

    $cdnUrl = "http://{$this->s3BucketName}.s3.amazonaws.com/" . $mediaInfo [ 'path' ];

    to

    $cdnUrl = "http://{$this->s3BucketName}/" . $mediaInfo [ 'path' ];

    and all works as desired.

    It would be nice to have an option in the admin area to accomplish this but this hack will work for now.

    http://wordpress.org/extend/plugins/wp-s3/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

  • RSS feed for this topic
  • Started 3 years ago by unca-joe
  • This topic is not a support question
  • WordPress version: 3.0.1

Tags