Need advice with PHP File Uploader "Task Complete" on Multiple File Upload

Last post 10-27-2010, 1:50 PM by Eric. 1 replies.
Sort Posts: Previous Next
  •  10-27-2010, 12:57 PM 64734

    Need advice with PHP File Uploader "Task Complete" on Multiple File Upload

    Hi,
     
    I am using "PHP File Uploader" with a customised SQL/PHP back-end. The uploader works fine for single file uploads, and in every respect but one, works fine for multiple file uploads.
     
    The problem I am experiencing is that when a file is uploaded successfully, I run the following code:
     
        <script type='text/javascript'>
        function CuteWebUI_AjaxUploader_OnTaskComplete(task)
        {
            window.location = "/complete?id=<?=$sessionkey;?>&deletekey=<?=$deletekey;?>";
        }
        </script>
     
    This code runs when a file has finished uploading, and it redirects to another page where the next stage is processed. 
     
    When I use multiple file uploads, it navigates to this page after the first file has uploaded, and the other selected files do not get uploaded. I need a function similar to the "OnTaskComplete" function, that is called when ALL the files in the multiple upload queue have been uploaded.
     
    Any ideas?
     
    Thanks,
    Kirk
     
    Filed under:
  •  10-27-2010, 1:50 PM 64736 in reply to 64734

    Re: Need advice with PHP File Uploader "Task Complete" on Multiple File Upload

    Dear techtoad,
     
    Please change
     <script type='text/javascript'>
        function CuteWebUI_AjaxUploader_OnTaskComplete(task)
        {
            window.location = "/complete?id=<?=$sessionkey;?>&deletekey=<?=$deletekey;?>";
        }
        </script>
    to
     <script type='text/javascript'>
    function CuteWebUI_AjaxUploader_OnPostback()
     {
          window.location = "/complete?id=<?=$sessionkey;?>&deletekey=<?=$deletekey;?>";
     }
     </script>
     
    After done, pls try it again.
     
    Thank you for asking
View as RSS news feed in XML