“http错误”当使用 JQuery 的 Uploadify 插件时
我正在使用这里的插件: http://www.uploadify.com/
我设置了一个简单的测试用例,选择文件等当我尝试上传时收到“HTTP 错误”。
这是我的标题中的相关代码..
<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript" src="../js/swfobject.js"></script>
<script type="text/javascript" src="js/jquery.uploadify.v2.1.0.min.js"></script>
<link href="css/reset.css" rel="stylesheet" type="text/css" />
<link href="css/admin.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
$(document).ready(function() {
$('#sampleFile').uploadify({
'uploader': 'include/uploadify/uploadify.swf',
'script': 'upload_test.php',
'folder': '/work/avais/bizlists/lists',
'cancelImg': 'include/uploadify/cancel.png'
});
});
</script>
</head>
.. 这是我的 html 代码..
<div id="upload_wrapper">
<input type="text" name="full_name" /><br />
<input id="sampleFile" name="sampleFile" type="file" />
<input type="button" name="upload" value="Upload" onclick="javascript:$('#sampleFile').uploadifyUpload();" />
</div>
我会提供链接,但它位于管理区域内。
我找不到任何有关解决此插件错误的文档。
编辑:我用 fiddler & 检查了它。我似乎收到“响应代码 413 - 请求实体太大”错误。
编辑:问题已解决....这是我在 .htaccess 文件中的一些内容的问题,可能是“LimitRequestBody”。
I'm using the plugin from here: http://www.uploadify.com/
I have setup a simple test case, select a file etc & I get a "HTTP Error" when I try to upload.
Here is the relevant code from my header..
<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript" src="../js/swfobject.js"></script>
<script type="text/javascript" src="js/jquery.uploadify.v2.1.0.min.js"></script>
<link href="css/reset.css" rel="stylesheet" type="text/css" />
<link href="css/admin.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
$(document).ready(function() {
$('#sampleFile').uploadify({
'uploader': 'include/uploadify/uploadify.swf',
'script': 'upload_test.php',
'folder': '/work/avais/bizlists/lists',
'cancelImg': 'include/uploadify/cancel.png'
});
});
</script>
</head>
.. and here is my html code..
<div id="upload_wrapper">
<input type="text" name="full_name" /><br />
<input id="sampleFile" name="sampleFile" type="file" />
<input type="button" name="upload" value="Upload" onclick="javascript:$('#sampleFile').uploadifyUpload();" />
</div>
I would provide the link but it's inside an admin area.
I couldn't find any documentation on troubleshooting errors on this plugin.
Edit: I checked it with fiddler & it seems I'm getting a "Response Code 413 - Request Entity Too Large" error.
Edit: Problem fixed.... it was an issue with some stuff I had in the .htaccess file, probably the "LimitRequestBody".
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我收到了不同的 http 错误:HTTP undefined 或 HTTP 500。经过 4 小时的网络搜索后,我找到了答案。
这是因为服务器使用了Mod_Security。要关闭它,请将这些行添加到 .htacess 文件中
来源:saturan 发布于 http://gallery.menalto。 com/node/94614
I got a different http error: HTTP undefined or HTTP 500. After 4 hours of searching the web, I found the answer.
It is because the server uses Mod_Security. To turn it off, add these lines to .htacess file
Credit: scaturan posted on http://gallery.menalto.com/node/94614
问题已解决......这是我在 .htaccess 文件中的一些内容的问题,可能是“LimitRequestBody”。
不知道为什么这些设置会影响它,因为我在其中设置的值比我尝试上传的文件更大,但遗憾的是我从 .htaccess 中取出的代码如下。
Problem fixed.... it was an issue with some stuff I had in the .htaccess file, probably the "LimitRequestBody".
Not sure why these settings affected it as the values I had set in there were larger values than the files I was trying to upload, but alas the code I took out of .htaccess was the below..