[wp-trac] [WordPress Trac] #21292: XML-RPC: wp_upload_bits should act like wp_handle_upload
WordPress Trac
wp-trac at lists.automattic.com
Thu Jul 26 22:50:53 UTC 2012
#21292: XML-RPC: wp_upload_bits should act like wp_handle_upload
--------------------------------------+------------------
Reporter: markoheijnen | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.5
Component: XML-RPC | Version: 1.5
Severity: normal | Resolution:
Keywords: needs-patch dev-feedback |
--------------------------------------+------------------
Comment (by markoheijnen):
Removed wp_check_filetype in the beginning of wp_upload_bits() and added
wp_check_filetype_and_ext in the end.
In this way you can manage the check trough the 4th parameter. (copied and
edited the code from #11946)
The only bad part is the need of unlink on error since you need to upload
the image.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21292#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list