Howdy, Stranger!

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

prevent auto start upload
  • Hi,
    I am using uploadify to upload multiple documents in my website along with Perl Catalyst.

    Here is the code i am using for that.

    <script type=\"text/javascript\" src=\"[% c.uri_for_static('js/uploadify/swfobject.js') %]\"></script>
    <script type=\"text/javascript\" src=\"[% c.uri_for_static('js/uploadify/jquery.uploadify.min.js') %]\"></script>
    <link rel=\"stylesheet\" type=\"text/css\" href=\"[% c.uri_for_static('css/uploadify/uploadify.css') %]\" media=\"screen\" />
    <script type=\"text/javascript\">
    $(document).ready(function() {
    $('#fileUpload').uploadify({
    'uploader' : $.uri_for_static('js/uploadify/uploadify.swf'),
    'script' : $.uri_for('/user/upload'),
    'multi' : true,
    'buttonText' : \"Select Files\",
    'folder' : \"files\",
    'cancelImg' : $.uri_for_static('images/uploadify/cancel.png'),
    'folder' : 'documents/', //folder to save uploads to
    });
    });
    </script>
    <script type=\"text/javascript\">
    function startUpload(id){
    var queryString = '&amp;' + $('#new_doc_upload').serialize();
    $('#'+id).uploadifySettings('scriptData',queryString);
    $('#'+id).uploadifyUpload();
    }
    </script>
    <div id=\"body\">
    <h2>Upload Data <span id=\"loader\" style=\"display: none;\"><img src=\"[% c.uri_for_static('images/uploadify/loading.gif') %]\" alt=\"Loading...\" /></span></h2>
    <div id=\"sidebar\">
    <!-- form to be replaced by uploadify -->
    <form id=\"new_doc_upload\" method=\"POST\">
    <div id=\"fileUpload\">You have a problem with your javascript</div>
    <div id=\"email_address\"><input type=\"text\" name=\"email\" id=\"email\" value=\"[% c.stash.benif_email %]\" /></div>
    <div id=\"submit_form\"><a href=\"javascript:startUpload('fileUpload')\">Start Upload</a></div>
    </form>
    </div>
    </div>


    I have not provided
    auto: true
    in my jquery ready function. But still upon selecting files uploadify started showing progress bar.
    could any one please let me know where i am doing wrong.

    Thanks
    mohan
  • Hi,

    i tried to follow uploadify example given uploadify.com,
    But now my problem seems to be with user autheticated sessions.
    No session data is being sent by uploadify, becasuse of that my backend script trying to redirect the user to login page.

    any ideas to send session data as well from uploadify please.

    thanks
    mohan
  • I believe auto is set to true by default so change

    'auto' : false,

    I had the same issue, flash does not send with the users session so try putting the users session id with the script

    /user/upload/session_id

    of send it using the scriptData option

    'scriptData' : session_id