[Request] Delete the local files and use wp-cron

[ad_1]

I think when a user uploads files, nothing should be done at this stage by default, as it heavily affects user experience (for example, if I upload 10 files, the completion speed for all will be quite slow).

After the file is uploaded, transfer it to R2 (using wp-cron, for instance). You could create a form for the user to set the wp-cron execution time, especially if the user utilizes image compression or similar methods.

Once the files are transferred to R2, update the image links within the post (using save_post, for example).

There should be an option to permanently delete the original file after successfully uploading it to R2.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer