Upload folder at DO Spaces
-
I am using version 2.0.5. Currently, I am uploading to both server and storage, i.e. Stores files only in the cloud is unchecked. Local path and filemask are blank, storage prefix set to folder in DO Spaces, and Full URL-path is set to DO Spaces. Website is accessing the files through the storage.
1) I have to set the Full URL-path to the full URL path at DO Spaces, and not just the storage public domain or subdomain, meaning something like “https://container.sgp1.digitaloceanspaces.com/prefix/wp-content/uploads”
2) Files are uploaded to the full absolute path in DO Spaces, and not relative path, meaning something like “https://container.sgp1.digitaloceanspaces.com/prefix/home/acct/public_html/wp-content/uploads”
I found that the upload file path is set in the file_path function in dos_class.php, with the line “$path = str_replace($this->upload_path, ”, $file);”. $file will contain the absolute path, $this->upload_path is empty if I leave local path setting empty. Even if it is “wp-content/uploads”, the file path will still contain the base path at the front.
Is this the intended behaviour when uploading to both server and storage, or am I missing anything? I just want to upload images to “https://container.sgp1.digitaloceanspaces.com/prefix/” and have them served from there in WordPress.
- The topic ‘Upload folder at DO Spaces’ is closed to new replies.