Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Not uploading
  • I was using uploadify before (v1.6) and it was all working fine.

    Recently I made a major system upgrade including an upgrade to jQuery 1.4.4 and it appears that this has broken uploadify.

    I have now upgraded to uploadify 2.1.4

    I am not getting any javascript errors in firebug but I am also not sending any data to the server when trying to send a file.

    The main jquery script is loaded in the page head and the uploadify files are loaded within a file that is pulled into an ui tab via ajax. The uploadify script and input are within an accordion inside that tab but I doubt that could have any effect.

    The "onInit" and "onSWFReady" events are triggered so uploadify is working, yet it won't upload.

    When I switch accordion panels, hiding or showing the uploadify input I make a GET request to uploader.swf which returns 200 OK.

    Yet when I select a file, with auto:true, no call to the server is made.
    The same happens with a $('#fileInput').uploadifyUpload();

    The folders permissions are fine. Specifying a folder in the config has no effect.
    Absolute and relative paths make no difference.

    My php script works - it was fine before, only slightly different from the demo and returns a "No files" error as expected when called manually in a browser.

    I have tested everything I can think of - does anyone have any suggestions before I scrap uploadify?


    <!--Main page head-->
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script&gt;
    <script type="text/javascript" src="<?=$systemurl?>/js/jquery.tools.min.25.js"></script>
    <script type="text/javascript" src="<?=$systemurl?>/js/jquery-ui-1.8.7.custom.min.js"></script>

    <!-- Top of ui accordion panel in AJAX loaded ui tab.
    <script src="<?=$systemurl?>/js/swfobject.js" type="text/javascript"></script>
    <script src="<?=$systemurl?>/js/jquery.uploadify.js" type="text/javascript"></script>
    <link href="<?=$systemurl?>/css/uploadify.css" rel="stylesheet" type="text/css">


    <!-- In ui accordion panel-->
    <input type="file" name="fileInput" id="fileInput" />
    <a href="javascript:$('#fileInput').uploadifyUpload();">Upload Files</a>
    <script type="text/javascript">
    $(document).ready(function() {
    $('#fileInput').uploadify ({
    'uploader': '/lib/uploader.swf',
    'multi': true,
    'script' : '/lib/perform_function.php?d=adminlib&f=upload-attachment.php',
    'cancelImg' : '/admin/images/cancel.png',
    'auto' : true,
    'onOpen' : function(event,ID,fileObj) { alert('The upload is beginning for ' + fileObj.name);},
    'onComplete' : function(event, ID, fileObj, response, data) {alert('There are ' + data.fileCount + ' files remaining in the queue.'); },
    'onInit' : function() {alert('Uploadify rocks my socks!');},
    'onSWFReady' : function() {alert('The flash button has been loaded.');},
    'onError' : function (event,ID,fileObj,errorObj) {alert(errorObj.type + ' Error: ' + errorObj.info);},
    'onProgress' : function(event,ID,fileObj,data) {var bytes = Math.round(data.bytesLoaded / 1024);$('#' + $(event.target).attr('id') + ID).find('.percentage').text(' - ' + bytes + 'KB Uploaded');return false;}
    });
    });
    </script>