Support » Plugin: WP Offload Media Lite for Amazon S3, DigitalOcean Spaces, and Google Cloud Storage » Plugin or WordPress adding version number to image name when offloading to S3

  • askimer

    (@askimer)


    when adding an image file to wordpress media library and offloading it with the plugin go S3 bucket the image file name is somehow complemented with a version number.
    For example, if my file name is image.jpg and I replace it with the same image, the file name is changing to image1.jpg etc.

    It doesn’t happen when not offloading to S3.

    Please help :(((

Viewing 5 replies - 1 through 5 (of 5 total)
  • huemanfoo

    (@huemanfoo)

    Could be that you have versioning enabled in your bucket?

    https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html

    askimer

    (@askimer)

    No, versioning is disabled.
    I suppose the problem is in the wordpress’ database and the way it handles files with similar file names, but I don’t know how to fix it.

    If I upload the same image directly to my S3 bucket it goes just ok, no extra numbers are complemented

    • This reply was modified 4 months ago by  askimer.
    Plugin Contributor ianmjones

    (@ianmjones)

    Hi @askimer,

    Sounds like WP Offload Media is recognizing that the new file would be offloaded to the bucket with a path that already exists, so it renames the file in the same way that WordPress would if the file already existed locally.

    Q1: When you said “if my file name is image.jpg and I replace it with the same image, the file name is changing to image1.jpg etc”, how are you replacing the image exactly?

    Q2: Which of WP Offload Media’s Path, Year/Month and Object Versioning settings do you have turned on?

    Q3: Have you turned on WP Offload Media’s Remove Files From Server setting?

    askimer

    (@askimer)

    >Sounds like WP Offload Media is recognizing that the new file would be offloaded >to the bucket with a path that already exists, so it renames the file in the same >way that WordPress would if the file already existed locally.

    Yes, it seems so, but I intentionally delete files from S3 bucket and from worpress media library, but it still renames the files 🙁

    askimer

    (@askimer)

    I suppose the point is in the wordpress’ and how it handles its database. Sometimes when you first delete an image and then upload an image with the same file name, the wordpress adds “-01” to the name.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.