&1"); exit(0); } if (isset($_GET['getFileList'])) { header('Content-type: application/json'); header("Pragma: no-cache"); header("Expires: 0"); system("cd '" . $FP . "';/bin/echo -n '{\"FileList\":['; /bin/ls | /usr/bin/sort | while read x; do if [ ! -f \".\${x}.md5\" ]; then /usr/bin/md5sum \"\${x}\" | /usr/bin/cut -c1-32 > \".\${x}.md5\"; fi; /bin/echo -n '{\"file\":{\"name\":\"'\${x}'\", \"md5\":\"'`/bin/cat \".\${x}.md5\"`'\", \"size\":\"'`/usr/bin/du -m \"\${x}\" | /usr/bin/cut -f1`'\"}},'; done; /bin/echo -n '{}]}'"); exit (0); } if (isset($_SERVER['HTTP_X_FILENAME'])) { // create new file if the name already exists - don't override $origFileName=$_SERVER['HTTP_X_FILENAME']; $fileName=$origFileName; $i=0; while (file_exists($FP . $fileName)) { $fileName=$origFileName . "." . ++$i; } //file_put_contents( $FP . $fileName, file_get_contents('php://input')); writefile_chunked($FP . $fileName); echo $fileName . " uploaded"; system("cd '" . $FP . "';/usr/bin/md5sum '" . $fileName . "' | /usr/bin/cut -c1-32 > '." . $fileName . ".md5'"); exit(0); } if (isset($_GET['kill'])) { unlink($FP . $_GET['kill']); unlink($FP . "." . $_GET['kill'] . ".md5"); exit(0); } ?>
| File | Size(MB) | MD5 | KILL |
|---|
Status Messages