PHP code example of georaldc / resumable-js-processor

1. Go to this page and download the library: Download georaldc/resumable-js-processor library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

georaldc / resumable-js-processor example snippets


$resumable = new ResumableJsProcessor('path/to/uploads');
if (isset($_FILES)) {
    $resumable->setMode(ResumableJsProcessor::MODE_UPLOAD_CHUNK);
} else {
    $resumable->setMode(ResumableJsProcessor::MODE_TEST_CHUNK);
}
$fileUploaded = $resumable->process();
if (false !== $fileUploaded) {
  // $fileUploaded will contain the upload path + filename of file that has been uploaded. You may do further processing here
}