Hi,
I am a new user to infragistics tools/controls. I am using the webupload control for upload of large sized multiple files.
My question is currently, in webupload control for multiple simultaneous uploads the OnUploadFinishing event is fired each time an individual file upload gets complete.So lets say the user has chosen 3 files then the OnUploadFinishing event would be fired 3 times.Now i have a requirement in which i want to fire a paricular event at the completion of upload of all the 3 files. Is there any other event i should look at OR some way of achieving my functionality? ( My event would be fired in my cs file and its not a javascript function.
Thanks
Hi yadusaxena,
Detailed information about server-side events and little code snippets you can check here: http://help.infragistics.com/NetAdvantage/ASPNET/2011.2/CLR4.0/?page=WebUpload_HTTP_Module_and_Handler.html
So each time the file is uploaded ( no matter it is simultaneous or not) OnUploadFinishing will be fired. You can bind to OnUploadFinishing or to OnUploadFinished. The main differance is that OnUploadFiinishing you can cancel event while OnUploadFinished is not cancellable.
Also you can check this post it could be helpful for you: http://forums.infragistics.com/forums/p/62513/319926.aspx#319926
Thanks for using our controls. If you have any other questions we will be glad to help you
Thanks,
Miro Hristov
Hi Miro Hristov, Thanks for your response.
I have already gone through the links which you have shared above, but i couldn't use it for my functionality.Also the blog forum link which you shared above seems to be talking about a diiferent issue .
I understand the difference between the 2 events , OnUploadFinishing and OnUploadFinished, but how do i achieve my functionality using the 2 events? May be i should explain my sitaution again to you. I have a requirement in which i will have multiple/simultaneous file uploads.The user would select multiple files and then click the upload button.Now i want some way to know that all my file uploads are over. For example, if 4 files have been selected for upload, then i should be able to know that when all my 4 files have been uploaded.
Now if in this situation i use the OnUploadFinished event , then this event is fired after upload of every individual file, so in my case this method would be fired 4 times.And OnUploadFinishing will be fired while the file uploads are taking place which will again be multiple times.
Can you help me with the above scenario, and let me know how do i get to know when ALL file uploads are complete?
Can any one from the Infragistics team please help me or provide certain info on this?It is a critical task i have at hand, how long do i need to wait for a reply?
Hey yadusaxena,
Sorry for the delay. Server side events have not information how many files are uploading at the same time(or are selected from the server side and ready to upload). I can propose you a solution which is in serverside and client-side. The idea is to bind to fileUploaded client side event and to check the count of remaining files to upload. When it is 0 then you can make AJAX request which in your server side calls your event. Small code snippet in your client side file(js or html):
$(
"#fileuploader").igUpload({
...
fileUploaded:
function (event, args) {
var $fileuploader = $('#fileuploader'), data = $fileuploader.igUpload('getFileInfoData');
if (data.uploadingIDs.length === 0) {
// make AJAX call where you can call your server side event
}
},
The main idea here is that you call client side method 'getFileInfoData' which is complex object that holds information about uploaded files, files that are uploading, name of the files, type etc.
If you have any other questions or you need help please contact us.
Thanks for your patience,
Our requirements changed!Thanks anyways :)