Feature Request: File Type Exclusions and WooCommerce Media Support for Cloudflare R2

vikikrisna

New member
Hi,

Thank you for building this plugin. I would like to suggest two features for the Cloudflare R2 media integration:

1. Exclude specific file types from automatic upload to Cloudflare R2
It would be very helpful to have an option to exclude certain file types from auto upload based on file extension, such as .zip, .pdf, and other selected file types.

This would give users more control over which files are offloaded to R2 and help avoid unnecessary storage usage for files that do not need to be uploaded.


2. WooCommerce media support for Cloudflare R2
Please consider adding better support for WooCommerce media in the R2 integration, especially for things like:
  • product images
  • gallery images
  • other WooCommerce-related media handling
This would be very useful for WooCommerce store owners who want to offload their media to Cloudflare R2 reliably.

Thank you for considering this suggestion.
 
  1. For individual files, you can already do that by manually moving a media item from R2 to local. I did add the ability to define extensions to exclude by default when uploading a new file in the next version. If you add this to your wp-config.php file, it will not send files with the extension types defined to R2 by default:

    PHP:
    $GLOBALS['app_for_cf_r2_exclude_extensions'] = function($excludeExtensions) {
        return ['pdf', 'zip'];
    };
  2. This one is a little tricker if WooCommerce isn't using WordPress Media for things. Will look into it as a possibility.
 
Back
Top