Interfacelab / ilab-media-tools

https://mediacloud.press/
GNU General Public License v3.0
114 stars 37 forks source link

Renamed assets won't upload to Cloudflare R2 #209

Open dgagnon720 opened 1 year ago

dgagnon720 commented 1 year ago

Describe the bug It is not 100% of the time but only sometimes and I didn't know why it works or not but with Cloudfare R2, when an asset with the same name already exist and the option to overwrite it is disabled, Media Cloud renames it but it won't upload the renamed assets to the cloud and it keeps refers to it in the post.

To Reproduce Steps to reproduce the behavior:

  1. make sure overwrite existing files is disable under cloud storage settings
  2. Uploads a file to the cloud
  3. upload a second file with the same name

Expected behavior

  1. media cloud will rename it
  2. check your cloud storage and the renamed file did not exist.
  3. if you added the media in the post editor, the post still refers to the renamed asset in the cloud but this file did not exist.

Screenshots If applicable, add screenshots to help explain your problem.

Server (please complete the following information)

How did you install the plugin? Downloaded form freemius

Additional context This isn't happens everytime but once in a while and I have more than one site with this setting (Wordpress 6.2, php 8.1, media cloud 4..5.20, Cloudflare R2) with the same behavior.