uploadify check script not working

To setup uploadify see the previous post:
Uploadify Setup

To add a check script add the following config:
$('#custom_file_upload').uploadify({
...
'checkScript'   : "uploadifycheck.php",
}

Where uploadifycheck should contain the lines:
 $value) {
  if ($key != 'folder') {    
    $targetFile = $root . "YOUR_PATH" . $value;  
    if (file_exists($targetFile)) {    
      $fileArray[$key] = $value;
    }
  }
}
/* It's important to have these 2 lines, echo or return alone is not enough.
 * If the file does not exists in the web server and you use echo if will not upload.
 * If only return the file will also not upload.
 */
echo json_encode($fileArray);
return json_encode($fileArray);
?>
uploadify check script not working uploadify check script not working Reviewed by Edward Legaspi on Friday, November 26, 2010 Rating: 5

No comments:

Powered by Blogger.