2011-04-08 47 views
3

我不知道爲什麼,但我舊的uploadify測試版3的實施工作很好 但現在,當我選擇一個文件,我沒有看到它在文件列表中...我不能上傳它。 在這裏,你會發現我是如何寫的,如果有人可以幫助我。選擇文件不能與uploadify測試版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

試試這個代碼:

<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> 
+0

我用另一種方式,THX很多關於你的答案 – kangun 2011-06-18 16:49:23

+1

@kangun - 如何發佈您的解決方案或標誌着固定您的問題的答案? – 2012-05-09 15:29:11

2

我有同樣的問題。解決方法很簡單,只需添加到列表PARAM:'scriptAccess: 'always'

+0

好吧,我會測試,thx很多;) – kangun 2011-07-16 09:33:52

+0

非常感謝...它節省了我的時間和聲望....很多謝謝..... – 2016-02-03 07:55:18

相關問題