[Plugin: WordPress Amazon S3 Plugin] unable to work
-
On some installations upload_path has a tailing ‘/’, so S3Plugin::$mediaUrl gets ‘http://www.dfgdg.com//’ and the plugin can not check for images on the post’s content.
So I changed my s3.php from
$this->mediaUrl = get_option ( ‘siteurl’ ) . ‘/’ . get_option ( ‘upload_path’, ‘wp-content/uploads’ ) . ‘/’;
$this->mediaPath = ABSPATH . get_option ( ‘upload_path’, ‘wp-content/uploads’ ) . DIRECTORY_SEPARATOR;to
$this->mediaUrl = get_option ( ‘siteurl’ ) . ‘/’ . get_option ( ‘upload_path’, ‘wp-content/uploads’ );
$this->mediaPath = ABSPATH . get_option ( ‘upload_path’, ‘wp-content/uploads’ );
if (substr($this->mediaUrl, -1) !== DIRECTORY_SEPARATOR)
$this->mediaUrl .= $this->mediaUrl;
if (substr($this->mediaPath, -1) !== DIRECTORY_SEPARATOR)
$this->mediaPath .= $this->mediaUrl;
- The topic ‘[Plugin: WordPress Amazon S3 Plugin] unable to work’ is closed to new replies.