Title: [Plugin: WordPress Amazon S3 Plugin] unable to work
Last modified: August 20, 2016

---

# [Plugin: WordPress Amazon S3 Plugin] unable to work

 *  Resolved [artemis.radial](https://wordpress.org/support/users/artemisradial/)
 * (@artemisradial)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-wordpress-amazon-s3-plugin-unable-to-work/)
 * On some installations upload_path has a tailing ‘/’, so S3Plugin::$mediaUrl gets‘
   [http://www.dfgdg.com//&#8217](http://www.dfgdg.com//&#8217); 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;
 * [http://wordpress.org/extend/plugins/wp-s3/](http://wordpress.org/extend/plugins/wp-s3/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [artemis.radial](https://wordpress.org/support/users/artemisradial/)
 * (@artemisradial)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-wordpress-amazon-s3-plugin-unable-to-work/#post-2449006)
 * a mistake in the code above
    the final code is following
 *     ```
       $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 .= DIRECTORY_SEPARATOR;
       if (substr($this->mediaPath, -1) !== DIRECTORY_SEPARATOR)
           $this->mediaPath .= DIRECTORY_SEPARATOR;
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: WordPress Amazon S3 Plugin] unable to work’ is closed to new
replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-s3.svg)
 * [Wordpress Amazon S3 Plugin](https://wordpress.org/plugins/wp-s3/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-s3/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-s3/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-s3/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-s3/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-s3/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [artemis.radial](https://wordpress.org/support/users/artemisradial/)
 * Last activity: [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-wordpress-amazon-s3-plugin-unable-to-work/#post-2449006)
 * Status: resolved