- Upload Suite Overview
- What's New?
- Choosing Upload Technology
- Evaluating Upload Suite
- Upload Suite Editions
- System Requirements
- Installation and Deployment Notes
- ActiveX/Java Uploader
- Where ActiveX/Java Uploader Can Be Useful
- Before You Started with ActiveX/Java Uploader
- ActiveX/Java Uploader Fundamentals
- ActiveX/Java Uploader User Interface
- Getting Started
- Using ActiveX/Java Uploader
- Troubleshooting
- Reference
- ActiveX/Java Uploader ASP.NET Reference
- ActiveX/Java Uploader PHP Reference
- ActiveX/Java Uploader JavaScript Reference
- ActiveX/Java Uploader Client-Side Events Reference
- Uploader Client-Side Events
- AfterPackageUpload Event ActiveX/Java Uploader
- AfterSendRequest Event ActiveX/Java Uploader
- AfterUpload Event ActiveX/Java Uploader
- BeforePackageUpload Event ActiveX/Java Uploader
- BeforeSendRequest Event ActiveX/Java Uploader
- BeforeUpload Event ActiveX/Java Uploader
- Error Event ActiveX/Java Uploader
- FolderChange Event ActiveX/Java Uploader
- ImageEditorClose Event ActiveX/Java Uploader
- ImageRotated Event ActiveX/Java Uploader
- InitComplete Event ActiveX/Java Uploader
- PreRender Event ActiveX/Java Uploader
- Progress Event ActiveX/Java Uploader
- RestrictionFailed Event ActiveX/Java Uploader
- SelectionChange Event ActiveX/Java Uploader
- UploadFileCountChange Event ActiveX/Java Uploader
- ViewChange Event ActiveX/Java Uploader
- Thumbnail Client-Side Events
- Uploader Client-Side Events
- POST Field Reference
- HTML5/Flash Uploader
- Licensing Information
- Legal Notices
Uploader.RestrictionFailed Event ActiveX/Java Uploader
Supported browsers:



This event fires when some restriction is broken.
Syntax
ASP.NET
<script type="text/javascript">
function Uploader1_RestrictionFailed(errorCode, fileName, message){
//...your code...
}
</script>
<aur:Uploader ID="Uploader1" runat="server">
<ClientEvents>
<aur:ClientEvent EventName="RestrictionFailed" HandlerName="Uploader1_RestrictionFailed" />
</ClientEvents>
</aur:Uploader>
PHP
<script type="text/javascript">
function Uploader1_RestrictionFailed(errorCode, fileName, message){
//...your code...
}
</script>
<?php
$Uploader = new Uploader("Uploader1");
//...other params...
$Uploader->getClientEvents()->setRestrictionFailed("Uploader1_RestrictionFailed");
//...other params...
$Uploader->render();
?>
JavaScript
function Uploader1_RestrictionFailed(errorCode, fileName, message){
//...your code...
}
$au.uploader({
events: {
//...other params...
restrictionFailed: [Uploader1_RestrictionFailed],
//...other params...
}
})
Parameters
- errorCode
-
Type: Number
One of the following values:
- 0 - size of the selected file exceeds the MaxFileSize value;
- 1 - size of the selected files is less than the MinFileSize value;
- 2 - the selected image is CMYK, when CMYK images are denied for the upload (i.e. the EnableCmyk is
false); - 3 - dimensions of the selected image are too large (i.e. image width or height exceeds the MaxImageHeight or MaxImageWidth value);
- 4 - dimensions of the selected image are too small (i.e. image width or height is less than the MinImageHeight or MinImageWidth value);
- 5 - the selected file has not allowed name (i.e. filename does not match FileMask, or matches DeniedFileMask);
- 6 - number of selected files exceeds the MaxFileCount value;
- 7 - total size of selected files exceeds the MaxTotalFileSize value;
- fileName
-
Type: String
The name of the file which breaks the restriction.
- message
-
Type: String
The message stating that the restriction is broken. The same message is displayed in the information bar.