开发者

Select file is not working with uploadify beta 3

开发者 https://www.devze.com 2023-02-23 05:50 出处:网络
I don\'t know why, but my old implementation of uploadify beta 3 was working great but now, when I select a file, I don\'t see it in the file list... and I can not upload it..开发者_如何学Go

I don't know why, but my old implementation of uploadify beta 3 was working great but now, when I select a file, I don't see it in the file list... and I can not upload it..开发者_如何学Go here you will find how I write it, if someone can help me.

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


I had the same problem. The solution is simple, just add to param list: 'scriptAccess: 'always'


Try this code:

<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

精彩评论

暂无评论...
验证码 换一张
取 消