georaldc/resumable-js-processor
Composer 安装命令:
composer require georaldc/resumable-js-processor
包简介
Easily handle uploads coming from Resumable.js
README 文档
README
Easily handle resumable.js uploads.
Inside target server file for resumable.js, instantiate the ResumableJsProcessor class with your intended upload path specified, pass the appropriate mode (supports 2 modes at the moment, see ResumableJsProcessor constants) and call the process() method.
$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 }
This file will be called multiple times for every chunk checked and uploaded. Once ResumableJsProcessor::process() returns a string, that will be indication that the chunks have been uploaded and assembled.
统计信息
- 总下载量: 83
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-06-22