Open hposborn opened 7 years ago
Looks like a Wordpress issue: https://core.trac.wordpress.org/ticket/17604 Last comment gives you the clue that a solution is to delete media first and upload after so names don't collision and need to be renamed with -1.
Cheers
I am attempting to upload "Current_image.png" with the media method from wordpress_xmlrpc. In the media directory of my site, I already have a "Current_image.png" file, which I would like to overwrite each time I run my script (so that the image on my website is constantly up to date). Except, when I give the data dictionary the 'overwrite':True label... nothing happens. A new filename appended by -1 is create as if the "overwrite" key was not there at all. Maybe I am misinterpretting what "overwrite" actually does here?
The code: