I am using the WebUpload control from the Infragistics.Web.UI.EditorControls namespace.
When I set e.Cancel = true in my UploadFinishing event handler it does not cancel the upload. As a result the FileUploaded page event fires, even though the upload should have canceled.
What do I need to do to make this work? Or do I need to do something myself, like delete the temporary file?
Hello TedTeichrieb,
It seems that you can cancel the upload in UploadFinishing server-side event, but the UploadFinished event will also be fired. So I have logged this behavior in our internal tracking system with development ID 129460. I have created a support ticket on your behalf with number CAS-106177-C4W4W5. You can view the status of the development issue connected to this case by selecting the "Development Issues" tab when viewing this case on the web site.
Let me know if you have any questions regarding the matter.
So are you saying that an upload can not be canceled in the UploadFinishing server event as it can with the UploadStarting server event?
If this is the case then shouldn't UploadFinishingEventArgs inherit UploadBaseEventArgs (like UploadFinishedEventArgs) rather then UploadCancellableBaseEventArgs (which it and UploadStartingEventArgs both inherit from).
UploadStartingEventArgs Documentation
UploadFinishingEventArgs Documentation
UploadFinishedEventArgs Documentation
Hi TedTeichrieb,
UploadFinishing is a server-side event. But to cancel the uploading of a file, you should return false in the FileUploading client event.
How would the client know that the file it is uploading is not going to pass the server side test which requires the complete file to perform?
I thought the UploadFinishing event is raised server side. Once that event is complete the control renames the uploaded file and fires the UploadFinished event.
If you want to cancel the upload, you should cancel the FileUploading client-side event:
function onFileUploading(e, file) { return false;}
Let me know if you have any questions.