Reputation: 53198
I have implemented the jQuery plugin Uploadify on a site, and for some reason the uploads themselves are not working as expected. The file input is correctly replaced with the Uploadify markup (including the Flash button), but whenever I select multiple files, nothing happens.
Here's a sample of the jQuery:
<script type="text/javascript">
$(document).ready(function() {
$('.uploadify').uploadify({
'uploader' : 'assets/uploadify/uploadify.swf',
'script' : 'assets/uploadify/uploadify.php',
'cancelImg' : 'assets/uploadify/cancel.png',
'folder' : 'user_images/<?= $dirname ?>',
'auto' : true,
'fileExt' : '*.jpg;*.gif;*.png',
'fileDesc' : 'Image Files (*.JPG, *.GIF, *.PNG)',
'multi' : true,
'removeCompleted' : false,
'queueSizeLimit' : <?= Settings::Get('max_num_profile_images') ?>
});
});
</script>
And a screenshot of the file input:
However, selecting files does not upload them, and no queue is displayed. I have checked that the directory exists (and it does), and that it has relevant permissions (and it does).
Can anyone help? It seems that the problem resides after selecting files. When I pick the files in the file browser and click "select", nothing is added to the queue, and it's not manipulated in any way.
Upvotes: 0
Views: 2400
Reputation: 148514
Put more accurate params ( size limitations etc) and alerts : (this is my code - revert it to your code) and tell what are the alerts..
$('.file_uploadH').uploadify({
'uploader': '/uploadify/uploadify.swf',
'script': '/Handler/Uploader.ashx?for=CustomizeInfo',
'fileExt': '*.jpg;*.gif;*.png;',
'fileDesc': 'Web Image Files (.JPG, .GIF, .PNG)',
'multi': false,
'queueSizeLimit': 1,
'simUploadLimit': 1,
'sizeLimit': 4194304,
'onProgress': function(event, ID, fileObj, data)
{
alert('1');
},
'onAllComplete': function(event, data)
{
alert('2');
},
'onComplete': function(event, ID, fileObj, response, data)
{
alert('3');
},
'onOpen': function(event, ID, fileObj)
{
alert('4');
}
});
Upvotes: 2