我不知道为什么,但我对uploadify beta 3的旧实现工作得很好 但现在,当我选择一个文件时,我没有在文件列表中看到它......我无法上传它.. 如果有人可以帮助我,你会在这里找到我的写作方式。
<strong>Multiple File Upload</strong></p>
<input id="fileInput2" name="fileInput2" type="file" height="30" width="110">
<div id="fileInput2Queue" class="uploadifyQueue"></div>
<a href="javascript:$('#fileInput2').uploadifyUpload();"><img border="0" src="./content/galerie/img/upload_files.png"></a> <br />
<a href="javascript:$('#fileInput2').uploadifyClearQueue();"><img border="0" src="./content/galerie/img/clear_queue.png"></a>
<script type="text/javascript">
$("#fileInput2").uploadify({
'buttonText' :'Upload',
'swf' : '../extras/uploadify/beta3/uploadify.swf',
'uploader' : './content/galerie/upload/uploadify.php',
'cancelImg' : '../extras/uploadify/beta3/cancel.png',
'checkExisting' : '../extras/uploadify/beta3/uploadify-check-exists.php',
'queueID' : 'fileInput2Queue',
'auto' : false,
'multi' : true,
'simUploadLimit' : 1,
'removeCompleted' : true,
'postData' : {'cat': ''.$_POST['cat'].'','folder' : ''.$directory.''},
'sizeLimit' : 8000,
'onError' : function (event,ID,fileObj,errorObj) {
alert(errorObj.type + ' Error: ' + errorObj.info);
}
});
</script>
答案 0 :(得分:2)
我遇到了同样的问题。解决方案很简单,只需添加到参数列表:'scriptAccess: 'always'
答案 1 :(得分:0)
试试这段代码:
<html>
<head>
<link href="/upload/uploadify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="/upload/jquery-1.5.1.min.js"></script>
<script type="text/javascript" src="/upload/jquery.uploadify.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#file_upload').uploadify({
'uploader' : '/upload/uploadify.php',
'swf' : '/upload/uploadify.swf',
'cancelImage' : '/upload/uploadify-cancel.png',
'buttonText' : 'Upload image',
'auto' : true,
'multi' : true,
'checkExisting' : false
});
});
</script>
</head>
<body>
<input id="file_upload" name="file_upload" type="file" />
</body>
</html>