WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 4 months ago

#34165 new defect (bug)

Incorrect file param in wp_handle_upload in class-wp-xmlrpc.php

Reported by: OceanicSurfer Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.3
Component: XML-RPC Keywords:
Focuses: Cc:
PR Number:

Description

Hello,

I am using the plugin imsanity which uses the wp_handle_upload hook to resize the upload.
This doesn't work when uploading via xml-rpc.

After digging deeper into this I found that the "file" param that is passed into this hook is inconsistent and changes depending on where this hook is triggered from. When uploading through the web interface the full file path is included in this param. When uploading via xml-rpc only the filename is given. When I modified class-wp-xmlrpc to be consistent with the web interface the plugin works.

Thanks
Michael

Change History (3)

#1 @markoheijnen
4 years ago

Hey Michael,

Could you report what you have changed to make it work? Would like to look at it but I do want to be sure that it in the end will work for you.

Thanks,
Marko

#2 @verysimple
4 years ago

Hi @markoheijnen , I believe this thread on my plugin support page has the Michael's replacement code: https://wordpress.org/support/topic/images-dont-resize-when-uploaded-via-mobile-device?replies=19

Note: See TracTickets for help on using tickets.