This documentation is for the old version. Go to the latest Upload Suite docs

ImageUploader.UploadThumbnailFitMode Property

Supported in: ActiveX , Java

Fit mode of the specified upload thumbnail.

Syntax

Get/Set Value in Runtime

JavaScript
getImageUploader("ImageUploaderID").setUploadThumbnailFitMode(Index, value);
value = getImageUploader("ImageUploaderID").getUploadThumbnailFitMode(Index);

Parameters

Index

A positive integer that specifies an index of the upload thumbnail (one-based). It should not exceed UploadThumbnailCount. If extra upload thumbnails are required, use the UploadThumbnailAdd() method to add them.

Property Value

A member of this enumeration that specifies a fit mode for the specified thumbnail:

String valueInteger valueDescription
Off0Do not send a thumbnail of this size to the server.
Fit1Send a thumbnail which is resized to fit the specified rectangle.
Width2 Send a thumbnail which is resized to have the width which is not larger than the specified one.
Height3 Send a thumbnail which is resized to have the height which is not larger than the specified one.
Icon4Send an icon of the file instead of the thumbnail.
ActualSize5 Send the image of the original size (rotating and recompressing it if necessary).

If unsupported string value is passed, it is interpreted as Off.

Note

When you receive this value through the JavaScript, integer value will be returned (even if you initialize appropriate property with a string value).

Remarks

Image Uploader can generate multiple thumbnails per one file sent to the server. To configure sizes of thumbnails and other parameters, you can manipulate a list of upload thumbnail settings. It can be done two ways:

  1. Use UploadThumbnailNXXX parameters, where N is a number in range from 1 to 3.
  2. Use the UploadThumbnailAdd() method in JavaScript to add extra thumbnail sizes, and UploadThumbnailXXX properties to change specific settings.

First method is simpler, however it allows to upload not more than 3 thumbnails per one file. The second one does not have any limitation on the number of thumbnails.

To get an upload thumbnail on the server use the UploadThumbnailX HTTP POST field, where X is an index of the upload thumbnail.

Note

The index of upload thumbnail list is one-based.

If you choose to send resized thumbnails, you can specify the quality of resizing with the UploadThumbnailResizeQuality property.

See Also

Manual

Reference