kangun
kangun

Reputation: 126

Select file is not working with uploadify beta 3

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

Upvotes: 3

Views: 1326

Answers (2)

Athlan
Athlan

Reputation: 21

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

Upvotes: 2

kuzey beytar
kuzey beytar

Reputation: 3226

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>

Upvotes: 0

Related Questions