Sequence of events - Queue table shows uploaded BEFORE Ajax postback fired and complete

  •  03-19-2014, 9:20 PM

    Sequence of events - Queue table shows uploaded BEFORE Ajax postback fired and complete

    Sorry if this is a newbie question.  I searched the forums but couldn't find an answer.  I am just trying the product with the 30 day trial and love the concept.  The ajax postbacks are awesome and this looks like this product fits my needs perfectly, except one issue.

     

    The issue I have is with some lag.  Basically I have a page where users will upload several fairly large documents at once (say 15 documents 1 mb each).  After they are done I want to redirect to a different page (via OnUploadCompleted).

     

    My asp page has the <CuteWebUI:UploadAttachments control where the OnFileUploaded postback sub basically reads the files as a stream and uploads to a database.  The problem is that the the queue table puts the green mark BEFORE the postback method has completed.  So the queue table shows green arrows fairly quickly while ajax hasn't finished it's business.  This bit of lag creates the illusion that the page is broken because the queue table shows all green arrows but nothing is happening because the Ajax calls are still doing their thing.


    I know this is the nature of the beast with async calls back to the server but just wondering if there was a way to reverse the flow:

    1) File is Uploaded.

    2) Postback is fired and OnFileUploaded runs to completion.

    3) File status changes to "Green" check mark.

     

    This way the queue table reflects when the file made it to the database rather and the page will redirect shortly after the last file turns green.

View Complete Thread