## Aurigma Image Uploader Flash 7.2.2

# Uploading Large Amount of Images

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

Adobe Flash Player has the following peculiarities about files handling:

- To get some information from a file this file has to be loaded to memory.
- File being once loaded to memory cannot be unloaded.
- Adobe Flash Player has access to the limited amount of memory.

These limitations affect uploading images most of all, because performing image-specific operations (creating thumbnails, obtaining image dimensions and metadata, and etc.) requires to load image files to memory.

Working on Image Uploader Flash we have found that thumbnails in upload pane can be created for about 200 user-selected 8Mpix photos, whereas creating more thumbnails causes the "out of memory" problem. Thus, Image Uploader Flash has a mechanism preventing it from running out of memory. The mechanism logic is rather simple: if Adobe Flash Player is about to consume all available memory, Image Uploader Flash stops creating thumbnails and displays the remaining image files as icons.

So, if a user selects to upload more images than Adobe Flash Player can keep in memory, some of these images will be shown as icons in the upload pane. To prevent this from happening you can use one of the following approaches:

- Restrict maximum total size of files selected to upload. This way is suitable if you expect that not more than 200 photos of the average size will be uploaded per one upload session.
- Set Icons view mode. This approach works better if your application requires uploading large amount of images at once.

Note

If you set MaxImageHeight, MaxImageWidth, MinImageHeight, or MinImageWidth restrictions Image Uploader Flash automatically sets the MaxTotalFileSize property equal to 250 Megabytes.

## Restricting Maximum Total Size of Files Selected to Upload

This approach offers you to configure Image Uploader Flash in such way that users cannot select more files than Adobe Flash Player is able to handle. Thus, you can be sure that all user-selected images will be shown as thumbnails in the Upload Pane, if the other is not set by the ViewMode property. Use the MaxTotalFileSize property to specify maximum total size of files selected to upload.

The following configuration sets the MaxTotalFileSize property to 200 Megabytes:

### ASP.NET

    <aur:ImageUploaderFlash ID="Uploader1" runat="server" >
        <Restrictions MaxTotalFileSize="209715200" />
    </aur:ImageUploaderFlash>

### PHP

    $uploader = new ImageUploaderFlash("Uploader1");
    $uploader->getRestrictions()->setMaxTotalFileSize("209715200");
    $uploader->render();

### JavaScript

    var fu = $au.imageUploaderFlash({
        id: 'Uploader1',
        restrictions: { maxTotalFileSize: "209715200"},
    });
    fu.writeHtml();

## Setting Icons View Mode

In this case all files in Upload Pane will be shown as icons. As a result there will be no need to load selected files to memory. So, no additional limitations should be set and no thumbnails/icons mix will happen. To utilize this approach set the ViewMode property to Icons as it is shown in the following sample:

### ASP.NET

    <aur:ImageUploaderFlash ID="Uploader1" runat="server" >
        <UploadPane ViewMode="Icons" />
    </aur:ImageUploaderFlash>

### PHP

    $uploader = new ImageUploaderFlash("Uploader1");
    $uploader->getUploadPane()->setViewMode("Icons");
    $uploader->render();

### JavaScript

    var fu = $au.imageUploaderFlash({
        id: 'Uploader1',
        uploadPane: { viewMode: "Icons"},
    });
    fu.writeHtml();

## See Also

### Reference

- MaxTotalFileSize Property
- UploadPane Property

### Manual

- Configuring Restriction Rules for Files

- 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)

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

- ViewMode (ASP.NET)
- ViewMode (PHP)
- viewMode (JavaScript)

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

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

- ViewMode (ASP.NET)
- ViewMode (PHP)
- viewMode (JavaScript)

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

- UploadPane (ASP.NET)
- UploadPane (PHP)
- uploadPane (JavaScript)