cybermirage
Forum Replies Created
-
Forum: Plugins
In reply to: [DigitalOcean Spaces Sync] Upload folder at DO SpacesHi @dickoms
Your method would work for me and less intrusive since the source code need not be changed. It’s just that local path cannot be left empty as default. I prefer not to change the local path for every WordPress site I have.
Let’s see if the author decides to change anything for the next update.
Cheers!
Forum: Plugins
In reply to: [DigitalOcean Spaces Sync] Upload folder at DO SpacesWhat I am trying to achieve is for every upload of image file into the library, it will upload the file to the WordPress server in the default folder, e.g.
/home/my-acct/public_html/wp-content/uploads/image.jpg
and to DO in the folder
https://single-container.ams3.cdn.digitaloceanspaces.com/production
with the prefix set asproduction
Forum: Plugins
In reply to: [DigitalOcean Spaces Sync] Upload folder at DO SpacesJust to clarify, existing images from the WordPress site are uploaded to the correct folder in DO, and working properly using the prefix and full url path in the way you’ve described.
It is the new image files uploaded to the WordPress library that is uploaded to the incorrect folder in DO as it will include the base path of the WordPress folder. I can’t change the local path setting as this will then upload to the wrong folder in the WordPress server right?
Forum: Plugins
In reply to: [DigitalOcean Spaces Sync] Upload folder at DO SpacesYes, I did just that, so using your example, prefix is set
production
and full url path is set to
https://single-container.ams3.cdn.digitaloceanspaces.com/production
.
However, new images are uploaded to
. I traced the file path to the line
$path = str_replace($this->upload_path, ”, $file);
in the dos_class.php file and the final path seems to be
/home/my-acct/public_html/wp-content/uploads/image.jpg
Fyi, I did not use the cdn path, but that should not matter right?