plupload - How $maxFileAge from upload.php works -


i'm using plupload api , there upload.php sample. there $maxfileage variable in upload.php , used in if statement , said remove old temp files. want know how can check if works , on. here variable:

$maxfileage = 5 * 3600; // temp file age in seconds 

and somewhere down there if statement:

// remove old temp files     if ($cleanuptargetdir) {     if (!is_dir($targetdir) || !$dir = opendir($targetdir)) {         die('{"jsonrpc" : "2.0", "error" : {"code": 100, "message": "failed open temp directory."}, "id" : "id"}');     }      while (($file = readdir($dir)) !== false) {         $tmpfilepath = $targetdir . directory_separator . $file;          // if temp file current file proceed next         if ($tmpfilepath == "{$filepath}.part") {             continue;         }          // remove temp file if older max age , not current file         if (preg_match('/\.part$/', $file) || (filemtime($tmpfilepath) < time() - $maxfileage)) {             @unlink($tmpfilepath);         }     }     closedir($dir); } 


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -