How to block the operation when a file is uploaded without showing the exception dailog?
My requirement is when a file is uploaded I will use file link instead of uploaded file by some rules.
I can call eventArgs.AddRestriction(new ExtensionRestriction("", "some exeption")) in DocumentService.AddFileEvents.GetRestrictions event, but a exception dialog will be shown, I don't need the exception dialog. What should I do? Thank you.
Solved! Go to Solution.
Solved by Redmond.D. Go to Solution.
It sound to me like you want to replace the default Add functionality with your own Add logic.
The event mechanism was not designed to let you do that. You can block the operation, you can do things before and after the operation, but you can't change the operation itself.
If you want sepcialized Add behavior, you will need to provide your own Add command.
Hi doug, Thank your for your help!
I think the "Show exception dialog" funtion from Vault Pro.
So I found anthor way. I upload files by Autoloader instead of Vault Pro. so the exception dialog will not be shown.