Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @chauthong

    Thank you for your inquiry and I am happy to assist you with this.
    When storing files on s3, there are no such things as folders. There is a bucket (your APP_CONFIG[:s3_bucket] presumably), and there are objects. That is it. There are no folders. One of your objects might be named wp-content/uploads/2020/09/files.jpg but there are no folders there, only an object with a name that looks like a path, and then the value of the object (the actual file residing at that location).

    So to answer your question, you cannot rename folders because there is no such thing on s3. You have to rename individual objects.
    Thanks!

    Thread Starter chauthong

    (@chauthong)

    Hello @vmarko , thanks for your reply.

    My files are currently being stored on S3 with Url of: https://images.domain.com/uploads/2020/09/files.jpg (without wp-content). When using W3 total cache plugin and enabled “Host attachments”, the urls of the images in the post display incorrectly, because W3 total cache generates urls containing “wp-content”. Doesn’t match the image url I saved earlier on S3. How can I fix this problem?

    Thank you!

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @chauthong

    Thank you for the information.
    If the path of the file on your server is https://domain.com/wp-content/uploads/2020/09/files.jpg then the path on the CDN will be the same except the domain which will be changed accordingly depending on the CDN URL.
    You cannot change the path as it will result in the 404.
    W3 Total Cache does not generate URLs it’s simply telling the CDN where those files are located.
    Thanks!

    Thread Starter chauthong

    (@chauthong)

    Hi Marko Vasiljevic,

    So is there only way I had to move my previous files to the “wp-content” object on the S3 bucket so that the image renders correctly on the website?

    Thank you!

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @chauthong

    I am not sure I understand your question.
    Are you experiencing andy issues with the images?
    As I’ve mentioned before there are objects in the Bucket which can be renamed.
    However, the original path of the file from your server cannot be changed.
    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Change directory path’ is closed to new replies.