Scenario
Upload a file or multiple files. The server event fires indicating complete. Server has some processing to complete in this event. The client event however fires right away. Any way around this? I would assume that the client event would not fire before the server event handler has completed.
Thanks
Hello Lenny,
Can you specify what do you need to achieve. The requests made from the upload control are async requests. The events are fired on different machines one is on the client machine the other one on the server it is hard to determine which one is fired first and which one after.
If you specify what scenario you need to achieve we can assist you further with this.
Looking forward to hear from you.
Sincerely,
Georgi Sashev
Developer Support Engineer
Infragistics, Inc.
http://ko.infragistics.com/support
Here is what we are attempting. Upload a file to one server then transfer the file to another data center via a webservice. The second transfer occurs during the server event UploadFinished. We were hoping that the client event would wait until the server event had completed. We have implemented a workaround that involves polling the server via Ajax to see if all our secondary transfers have completed before we allow the client to close the upload dialog.
Thanks for the information
Hi Lenny,
Indeed you have implemented the correct logic. When client side event uploadfinished is called you should make AJAX requests to get information whether the upload is finished on server AND also that you have finished work with this file(on server side). As you know this could take more time that you expect - you can make on server any other manipulations with the file that can take time. When the client receives that the server has finished uploading(any other manipulations) file then you can notify the client that he could close the upload dialog(or any other custom logic).
Thanks,
Miro Hristov