My difficulty arises from a function in a WordPress plugin called NextGen Public Uploader . In handleUpload() value of $_FILES['MF__F_0_0']['error'] used to determine if a download has occurred. MF__F_0_0 not a named field in $_FILES . Also, I cannot find a link or discussion of a key or attribute named MF__F_0_0 in the source code or on the Internet.
The skeletal code of the function I'm discussing is given below.
// Function: Handle Upload for Shortcode public function handleUpload() { /* setup and other definitions */ if ($_POST['uploadimage']) { /* check_admin_referer(...) */ if ($_FILES['MF__F_0_0']['error'] == 0) { /* process the upload */ } else { /* mitigate failed upload */ } } }
Does anyone know what MF__F_0_0 specifically refers MF__F_0_0 ?
Does anyone know where I should read about the above key?
edit . It occurred to me that I had to include the linked code from the web page used to create the POST. The code was generated by the plugin using short WordPress code.
<div id="uploadimage"> <form name="uploadimage" id="uploadimage_form" method="POST" enctype="multipart/form-data" accept-charset="utf-8"><input type="hidden" id="_wpnonce" name="_wpnonce" value="ae8639d6bf"><input type="hidden" name="_wp_http_referer" value="/chipamp-v3/gallery-better/"> <div class="uploader"> <input type="file" name="imagefiles" id="imagefiles"> </div> <input type="hidden" name="galleryselect" value="3"> <div class="image_details_textfield"> </div> <div class="submit"><br> <input class="button-primary" type="submit" name="uploadimage" id="uploadimage_btn" value="Upload"> </div> </form> </div>
edit # 2 : I deployed a WordPress test site with the appropriate plugins / code here in case someone wants to try to analyze the situation themselves. My efforts with the Chrome console and Firebug in Firefox were unsuccessful, but I'm not sure I know what to look for.
edit # 3 : in order to prevent JavaScript on the web page or calling check-admin-referer in PHP complicate my situation, I uploaded the image and dumped the contents of $_FILES to the console (immediately before the if statement). As you will see, there is no field MF__F_0_0 .
Array ( [imagefiles] => Array ( [name] => Koala.jpg [type] => image/jpeg [tmp_name] => /tmp/phpl65KuS [error] => 0 [size] => 780831 ) )
source share