我设置了 Fine-uploader 并创建了一个 PHP Server 处理程序,它正在实例化 qqfileuploader.php。一切正常,直到我尝试上传大文件。高达 600-700 MB 效果很好,现在我尝试了一个 909 MB 的文件:
日志:
FineUploader 3.8.2] Sending upload request for 3
它正在上传,但是当进度条达到 100% 时,它又从 0% 开始。然后它显示“正在处理..”并再次显示进度条。然后过了一会儿:
日志:
[FineUploader 3.8.2] xhr - server response received for 3
[FineUploader 3.8.2] responseText =
[FineUploader 3.8.2] Received response status 0 with body:
[FineUploader 3.8.2] Error when attempting to parse xhr response text (Unexpected end of input)
在我的本地机器上,它甚至可以使用相同的文件。只有在我的虚拟主机上完成时才会出现问题。post_max 大小和上传文件大小设置正确。我还可以做些什么?
这是我的服务器端上传处理方法:
public function doUpload()
{
$uploader = new qqFileUploader('uploads');
$uploader->allowedExtensions = array();
$uploader->sizeLimit = 1200 * 1024 * 1024; // 1.2GB
$uploader->inputName = 'qqfile';
$uploader->prefix = $_SESSION['identifier']; //file prefix
$uploader->chunksFolder = 'chunks';
$result = $uploader->handleUpload('uploads');
$result['uploadName'] = $uploader->getUploadName();
header("Content-Type: text/plain");
echo json_encode($result);
}