I need to continue/stop file upload to server based the validation logic. If file passed validation,the file can be uploaded to server, otherwise stop the upload. Can this be done with RadAsyncUpload? If yes, can anyone show some sample code?
Thanks for any help.
You can handle the OnClientFileUploading event of RadAsyncupload, check the validation logic and if it fails you can cancel the upload by setting args.set_cancel(true) as follows.
Thanks for your reply. But my validation logic is on the server side. How can client side get to know the result of validation. Basically, I need to validate the uploaded file which is an excel file before allowing file to be uploaded to the server.
I think what I can do is to use the custom asyncUploadHandler and call validation class in the handler. then if validation failed, not continue on process the file and hope I can stop the file upload that way.