我在我的网站上使用Valums Ajax Uploader。一切工作正常我本地计算机上,但是当我尝试我的网站主服务器上的相同上传然后Firbug显示了这个错误:valums Ajax文件上传+ 406不可接受Error in Firbug
POST http://www.myexampledomain.com/upload.php?qqfile=201004151821387.1.flv 406不可接受8.37s
fileuploader.js(线1204)
响应体
<title>406 Not Acceptable</title>
<p>An appropriate representation of the requested resource /upload.php could not be found on this server.</p>
<p>Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.</p>
所有请求&响应头是here和fileuploader.js
的文件代码到附近号线1204:
params = params || {};
params['qqfile'] = name;
var queryString = qq.obj2url(params, this._options.action);
xhr.open("POST", queryString, true);
xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
xhr.setRequestHeader("X-File-Name", encodeURIComponent(name));
xhr.setRequestHeader("Content-Type", "application/octet-stream");
xhr.send(file); //line 1204
我已经搜索在谷歌和这个网站,但没有什么可被发现,所以请告诉我,我该如何解决这个问题呢?
我关于这个问题的其他问题 - 406 error on firebug only
upload.php也在正确的文件夹,我通过直接访问它来检查它 – Peeyush
是否一个简单的'.txt'文件上传没有错误?还是所有的上传都失败了? – andyb
no .txt也会导致相同的406错误 – Peeyush