0

I'm having some issues with fine-uploader. With smaller files (~20MB), everything is great. However, with larger files (100MB+), the files will upload to around 5%, then the progress bar will reset back to 0%.

Upload eventually fails with "Error when attempting to parse xhr response text (SyntaxError: Unexpected end of input)".

In my endpoint (upload.php), my very last line is "echo json_encode($result);". $result is an array, and here's the relevant PHP:

if (move_uploaded_file($file['tmp_name'], $target)){
    $result = array('success'=> true);
    $result['uploadName'] = $file['name'];
} else {
    $result = array('error'=> "Upload failed");
}
header("Content-Type: text/plain");
echo json_encode($result);

Is this an issue with upload.php or is something funky happening with fine-uploader?

4

2 回答 2

1

这是您的服务器环境中的服务器端代码错误的症状。您的服务器肯定返回错误。这将在 javascript 控制台中报告。请看一看。

于 2013-04-14T02:12:52.097 回答
0

原来这个问题是由 CloudFlare 引起的。

我为包含我上传内容的整个目录添加了一个自定义页面规则,但它似乎没有帮助。页面规则基本上禁用了该文件夹的所有 CloudFlare 内容,以及其中的所有内容(除非我不了解页面规则的功能)。

不过,在域上暂停 CloudFlare 似乎可以解决它。自从暂停 CloudFlare 以来,上传大文件一直有效。

一位 CloudFlare 员工在这里提到了一些事情

于 2013-04-14T23:13:37.507 回答