I'm trying to implement the new version of AjaxUpload in my wordpress options panels and metaboxes... though I am not convinced I should change from the old version which I had working. this is the jauery that is calling the uploader function:
var uploader = new qq.FileUploader({
// pass the dom node (ex. $(selector)[0] for jQuery users)
element: document.getElementById('file-uploader'),
// path to server-side upload script
action: ajaxurl,
params: { action: 'upload_callback', id: 'image', }, });
i remembered the ajaxurl and passing action to later be used as a function name from my attempt w/ the previous version. It seems to function properly in the sense that that function IS getting called.
and then my callback function is
function childtheme_upload_callback() {
$stuff = htmlspecialchars(serialize($_POST));
die( "hey: " . $stuff );
}
add_action('wp_ajax_upload_callback', 'childtheme_upload_callback');
this function was where i was attempting wp_handle_upload but it was always empty so I set about trying to debug it by checking if anything was ever coming through. but no matter what i do $_POST and $_FILES are empty. even tho firebug says the post request looks like this:
and firebug says the post "source" looks like:
Source GIF89aü���ÿêêÿÓÓÿÿÿÿåå,����ü��9©Ë8£´Ú+¸ûm HÈê ¡®×Þغ;ûéÄÐP9Éݲé\�;
which i had presumed to be the image? but at this point i have no idea. has anyone successfully applied the new http://valums.com/ajax-upload/ Ajax Upload with Wordpress's wp_handle_upload?