Aurigma Image Uploader 6.5 Dual
ImageUploader.UploadThumbnailAdd Method
Adds new element to the list of upload thumbnails.
Syntax
JavaScript
getImageUploader("ImageUploaderID").UploadThumbnailAdd(FitMode, Width, Height);Parameters
- FitMode
-
A member of the enumeration that specifies a fit mode of new upload thumbnail:
String value Integer value Description Off 0 Do not send a thumbnail of this size to the server. Fit 1 Send a thumbnail which is resized to fit the specified rectangle. Width 2 Send a thumbnail which is resized to have the width which is not larger than the specified one. Height 3 Send a thumbnail which is resized to have the height which is not larger than the specified one. Icon 4 Send an icon of the file instead of the thumbnail. ActualSize 5 Send the image of the original size (rotating and recompressing it if necessary). If unsupported string value is passed, it is interpreted as Off.
- Width
- A non-negative integer value that specifies a width of new upload thumbnail.
- Height
- A non-negative integer value that specifies a height of new upload thumbnail.
Return Value
An integer value that specifies an index of newly added item.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:
- Use UploadThumbnailNXXX parameters, where N is a number in range from 1 to 3.
- 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.
To configure other settings than fit mode and thumbnail dimensions, use appropriate UploadThumbnailXXX property. E.g. to change the JPEG quality, use the UploadThumbnailJpegQuality property.
If you choose to send resized thumbnails, you can specify the quality of resizing with the UploadThumbnailResizeQuality property.
You can also remove the upload thumbnail list element with the UploadThumbnailRemove() method.
See Also
Manual
Reference
- UploadThumbnailActualCount Property
- UploadThumbnailCount Property
- UploadThumbnailRemove() Method
- UploadThumbnailBackgroundColor Property
- UploadThumbnailCompressOversizedOnly Property
- UploadThumbnailCompressionMode Property
- UploadThumbnailCopyExif Property
- UploadThumbnailCopyIptc Property
- UploadThumbnailFitMode Property
- UploadThumbnailHeight Property
- UploadThumbnailJpegQuality Property
- UploadThumbnailResizeQuality Property
- UploadThumbnailResolution Property
- UploadThumbnailWatermark Property
- UploadThumbnailWidth Property