isUploaded() === false) { throw new UploadMissingFileException(); } // receive the file $save = $receiver->receive(); // check if the upload has finished (in chunk mode it will send smaller files) if ($save->isFinished()) { // save the file and return any response you need return $this->saveFile($save->getFile()); } // we are in chunk mode, lets send the current progress /** @var AbstractHandler $handler */ $handler = $save->handler(); $done = $handler->getPercentageDone(); return response()->json([ "done" => $done ]); } }