• Hey,

    We have been looking for a plugin like this for some time now, it does pretty much everything we were looking for to get Imgix implemented on our site, however, we have a problem with it.

    We used Object Versioning on WP S3 Offload and it seems that there are some compatibility issues with that, despite the recent changes, the plugin will not add the version to the URL of the image that is loaded.

    If this is something that could be fixed then that would be awesome as I would love to use this plugin, it’s really premium, despite not being premium.

    https://www.ads-software.com/plugins/ilab-media-tools/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hey,

    Same problem here. Have you find any solution for this?

    Thanks

    Plugin Author interfacelab

    (@interfacelab)

    I haven’t used WP S3 Offload for some time, so if you could give me more details on what that feature is, I can check it out. Is it in the free version?

    Thanks!

    Plugin Author interfacelab

    (@interfacelab)

    I got it.

    The latest version allows you to define a “prefix” to be applied to files uploaded to S3. From the documentation:

    This will prepend a prefix to any file uploaded to S3. For dynamically created prefixes, you can use the following variables: @{date:format}, @{site-name}, @{site-host}, @{user-name}, @{unique-id}, @{unique-path}. For the date token, format is any format string that you can use with php’s date() function. Note that specifying a prefix here will remove WordPress’s default date prefix. WordPress’s default prefix would look like: @{date:Y/m}

    As for compatibility coming from Offload S3 to Media Tools, that I’m not certain and will have to do some testing to confirm.

    jlotito

    (@jlotito)

    Thanks!! You are the best! I ‘m going to update the plugin now and test it.

    jlotito

    (@jlotito)

    Hi!!

    I have benn testing the new update and it works as expected.. Now i can set a prefix according to my path in my s3 bucket. But the main problem still happens, in wp-offload s3 plugin.. there is an option in which you can upload your images with a versioning control, this means that in every file you upload it is created a new folder with a timestamp wich represents the version.. This is made because is normally to have your s3 bucket configure with an aws cloud-front, by the way, the versioning option helps to the invalidations produced in the cloud-front and ensure that the file your are looking for, is downloading in the last version.

    On the other hand the last develop about the prefix has broken the delete action.. When I set a new prefix, upload a new file, and afterwards i delete from the wordpress (with the option dletes in s3 too, activated), the file is not found, and consequentely is not erased.

    Last, I would like to use the plugin using all the features I mentioned earlier, including the ability to use it in a multisite installation. (corrected by the prefix develop, but not working for the versioning feature)

    Thanks for listening to me. Sorry for my long post.. I will be impatient waiting for your answer.

    Thanks!

    jlotito

    (@jlotito)

    Hi, I have develop my own solution for this issue.

    All the design is located in the file ilab-media-tools/classes/tools/s3/ilab-media-s3-tool.php. And only takes a few code lines.

    For the delete action bug.. I have modified line 390 “$this->delete_file($s3,$data[‘file’]);” for “$this->delete_file($s3,$data[‘s3’][‘key’]);” and now whatever prefix I have set.. the delete action is able to find it and erase from the bucket too

    For the versioning bug. I have added the function get_object_version_string() from the plugin wp-offload s3, adpating the format to my requeriments, and i have also added new two options to the prefix in lines 292 and 293

    $prefix = str_replace(“@{versioning}”, $this->get_object_version_string(), $prefix);
    $prefix = str_replace(“@{site-id}”,sanitize_title(strtolower(get_current_blog_id())), $prefix);

    These two options “@{versioning} and @{site-id}” allow me to implements the same path that i had in the bucket.. Using the “multisite” folder, and the “versioning feature”.

    I think that this develop colud be great if were implemented in the master branch of the project. Please write me if anyone wants the file modified, in order to include it in the repository. That wolud be very grateful for me, because by this way, I will not have errores in futures plugin updates

    Thanks a lot for your time

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘WP S3 Offload Object Versioning problem’ is closed to new replies.