## Aurigma Image Uploader Flash 7.2.2

# ImageUploaderFlash.RestrictionFailed Event

- Collapse All Sections
- See Also
- Language Filter ( all languages )

This event fires when some restriction is broken.

## Syntax

### ASP.NET

    <script type="text/javascript">
    function ImageUploaderFlash1_RestrictionFailed(errorCode, fileName, message){
        //...your code...
    }
    </script>

    <aur:ImageUploaderFlash ID="ImageUploaderFlash1" runat="server">
        <ClientEvents>
            <aur:ClientEvent EventName="RestrictionFailed" HandlerName="ImageUploaderFlash1_RestrictionFailed" />
        </ClientEvents>
    </aur:ImageUploaderFlash>

### PHP

    <script type="text/javascript">
    function ImageUploaderFlash1_RestrictionFailed(errorCode, fileName, message){
        //...your code...
    }
    </script>

    <?php
        $ImageUploaderFlash = new ImageUploaderFlash("ImageUploaderFlash1");
        //...other params...
        $ImageUploaderFlash->getClientEvents()->setRestrictionFailed("ImageUploaderFlash1_RestrictionFailed");
        //...other params...
        $ImageUploaderFlash->render();
    ?>

### JavaScript

    function ImageUploaderFlash1_RestrictionFailed(errorCode, fileName, message){
        //...your code...
    }

    $au.imageUploaderFlash({
        events: {
            //...other params...
            restrictionFailed: [ImageUploaderFlash1_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;
  - 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;
  - 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.

## See Also

### Reference

- Restrictions Class
- RestrictionFailed Property

### Manual

- Configuring Restriction Rules for Files
- Using Image Uploader Flash at Runtime

- MaxFileSize (ASP.NET)
- MaxFileSize (PHP)
- maxFileSize (JavaScript)

- MinFileSize (ASP.NET)
- MinFileSize (PHP)
- minFileSize (JavaScript)

- MaxImageHeight (ASP.NET)
- MaxImageHeight (PHP)
- maxImageHeight (JavaScript)

- MaxImageWidth (ASP.NET)
- MaxImageWidth (PHP)
- maxImageWidth (JavaScript)

- MinImageHeight (ASP.NET)
- MinImageHeight (PHP)
- minImageHeight (JavaScript)

- MinImageWidth (ASP.NET)
- MinImageWidth (PHP)
- minImageWidth (JavaScript)

- FileMask (ASP.NET)
- FileMask (PHP)
- fileMask (JavaScript)

- MaxFileCount (ASP.NET)
- MaxFileCount (PHP)
- maxFileCount (JavaScript)

- MaxTotalFileSize (ASP.NET)
- MaxTotalFileSize (PHP)
- maxTotalFileSize (JavaScript)

- Restrictions (ASP.NET)
- Restrictions (PHP)
- restrictions (JavaScript)

- RestrictionFailed (PHP)
- restrictionFailed (JavaScript)