Opened 2 years ago
Last modified 7 months ago
#17604 new defect (bug)
wp.uploadFile overwrite doesn't work
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Future Release |
| Component: | XML-RPC | Version: | 3.2 |
| Severity: | normal | Keywords: | has-patch 3.6-early |
| Cc: | marcel@… |
Description
Removing the following lines from the function mw_newMediaObject file class-wp-xmlrpc-server.php solves the problem:
$filename = preg_replace('/^wpid\d+-/', '', $name);
$name = "wpid{$old_file->ID}-{$filename}";
Why are these lines there anyway? overwrite is overwrite.
This, presumably, bug exists in WP 3.1 too.
Attachments (1)
Change History (9)
comment:2
SergeyBiryukov — 8 months ago
comment:3
follow-up:
↓ 4
markoheijnen — 8 months ago
Can we remove this functionality. I don't get why it is in their the first place because it isn't something WordPress does by itself
Replying to markoheijnen:
Can we remove this functionality. I don't get why it is in their the first place because it isn't something WordPress does by itself
Works for me.
comment:6
markoheijnen — 8 months ago
The patch removes overwrite functionality. Looked in to it more and it was never overwrite. It's more delete and upload a new one.
comment:7
markoheijnen — 8 months ago
- Keywords has-patch added

Related: [5008]