Title: Developer issue
Last modified: August 30, 2016

---

# Developer issue

 *  [moowoo](https://wordpress.org/support/users/moowoo/)
 * (@moowoo)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/developer-issue/)
 * Hey,
 * I have just installed the plugin and encountered this issue when trying to import
   existing wordpress media to S3 and I have solved it.
 * I just wanna know if its only happened on me.
 * My issue is like this:
 * I tried whatever send file to S3 (single) or the migration tools Sync for the
   existing file.
 * I knew both of them are calling push_to_s3
 * I checked the path is incorrect.
 * Precisely, I wanna give this example.
    $localFile = “/var/www/html/live/wp-content/
   uploads/var/www/html/live/wp-content/uploads/2015/09/hello.pdf”; $remoteFile 
   = “/wp-content/uploads/var/www/html/live/wp-content/uploads/2015/09/hello.pdf”
 * Obviously the path is not correct because the root path looks like duplicated.
 * I have dig down a little bit I found that the keys that passing to push_to_s3
   is like
    /var/www/html/live/wp-content/uploads/2015/09/hello.pdf
 * and key will be appended directly as the path pointing to the local file or constructed
   as the S3 directory path.
 * My fix is just
 * adding line
    ** $key = str_replace($this->uploads[“basedir”],””,$key);  on top
   of
 * $localFile = $this->sanitize_s3_path($this->uploads[“basedir”] . “/” . $key);
 * Anyway, it would be nice if someone can explain to me why would that happened
   to my instance
 * [https://wordpress.org/plugins/tcs3/](https://wordpress.org/plugins/tcs3/)

Viewing 1 replies (of 1 total)

 *  [tcmccarthy](https://wordpress.org/support/users/tcmccarthy/)
 * (@tcmccarthy)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/developer-issue/#post-6617881)
 * Thanks for sending. This happens most often when you have the full path to uploads
   defined in your wordpress settings. WordPress usually defines a relative path
   instead so my plugin fills in the missing piece. I will add a check to the plugin
   to allow for both scenarios in a future release.

Viewing 1 replies (of 1 total)

The topic ‘Developer issue’ is closed to new replies.

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

 * 1 reply
 * 2 participants
 * Last reply from: [tcmccarthy](https://wordpress.org/support/users/tcmccarthy/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/developer-issue/#post-6617881)
 * Status: not resolved