- Upload Suite Overview
- What's New?
- Choosing Upload Technology
- Evaluating Upload Suite
- Upload Suite Editions
- System Requirements
- Installation and Deployment Notes
- ActiveX/Java Uploader
- HTML5/Flash Uploader
- Before You Started with HTML5/Flash Uploader
- HTML5/Flash Uploader Architecture
- HTML5/Flash Uploader User Interface
- Getting Started
- Using HTML5/Flash Uploader
- Troubleshooting
- Reference
- HTML5/Flash Uploader ASP.NET Reference
- HTML5/Flash Uploader PHP Reference
- HTML5/Flash Uploader JavaScript Reference
- $au Namespace HTML5/Flash Uploader JavaScript
- addFilesProgressDialog Class HTML5/Flash Uploader JavaScript
- commonDialog Class HTML5/Flash Uploader JavaScript
- converter Class HTML5/Flash Uploader JavaScript
- converter Members HTML5/Flash Uploader JavaScript
- converter Methods HTML5/Flash Uploader JavaScript
- converter Properties HTML5/Flash Uploader JavaScript
- autoReduceDimensions Property HTML5/Flash Uploader JavaScript
- hash Property HTML5/Flash Uploader JavaScript
- mode Property HTML5/Flash Uploader JavaScript
- thumbnailApplyCrop Property HTML5/Flash Uploader JavaScript
- thumbnailApplyDrawTool Property HTML5/Flash Uploader JavaScript
- thumbnailBgColor Property HTML5/Flash Uploader JavaScript
- thumbnailCompressOversizedOnly Property HTML5/Flash Uploader JavaScript
- thumbnailCopyColorProfile Property HTML5/Flash Uploader JavaScript
- thumbnailCopyExif Property HTML5/Flash Uploader JavaScript
- thumbnailCopyIptc Property HTML5/Flash Uploader JavaScript
- thumbnailFitMode Property HTML5/Flash Uploader JavaScript
- thumbnailHeight Property HTML5/Flash Uploader JavaScript
- thumbnailJpegQuality Property HTML5/Flash Uploader JavaScript
- thumbnailResizeCmyk Property HTML5/Flash Uploader JavaScript
- thumbnailResizeFailureDetector Property HTML5/Flash Uploader JavaScript
- thumbnailResizeQuality Property HTML5/Flash Uploader JavaScript
- thumbnailResolution Property HTML5/Flash Uploader JavaScript
- thumbnailSizeLimit Property HTML5/Flash Uploader JavaScript
- thumbnailType Property HTML5/Flash Uploader JavaScript
- thumbnailUseExifPreview Property HTML5/Flash Uploader JavaScript
- thumbnailWatermark Property HTML5/Flash Uploader JavaScript
- thumbnailWidth Property HTML5/Flash Uploader JavaScript
- converters Class HTML5/Flash Uploader JavaScript
- debug Class HTML5/Flash Uploader JavaScript
- descriptionEditor Class HTML5/Flash Uploader JavaScript
- drawTool Class HTML5/Flash Uploader JavaScript
- event Class HTML5/Flash Uploader JavaScript
- events Class HTML5/Flash Uploader JavaScript
- file Class HTML5/Flash Uploader JavaScript
- files Class HTML5/Flash Uploader JavaScript
- flashControl Class HTML5/Flash Uploader JavaScript
- imageEditor Class HTML5/Flash Uploader JavaScript
- imagePreviewWindow Class HTML5/Flash Uploader JavaScript
- imageUploaderFlash Class HTML5/Flash Uploader JavaScript
- informationBar Class HTML5/Flash Uploader JavaScript
- messages Class HTML5/Flash Uploader JavaScript
- metadata Class HTML5/Flash Uploader JavaScript
- paneItem Class HTML5/Flash Uploader JavaScript
- restrictions Class HTML5/Flash Uploader JavaScript
- statusPane Class HTML5/Flash Uploader JavaScript
- topPane Class HTML5/Flash Uploader JavaScript
- uploadErrorDialog Class HTML5/Flash Uploader JavaScript
- uploadPane Class HTML5/Flash Uploader JavaScript
- uploadSettings Class HTML5/Flash Uploader JavaScript
- $au.amazonS3Extender Namespace HTML5/Flash Uploader JavaScript
- $au Namespace HTML5/Flash Uploader JavaScript
- HTML5/Flash Uploader Client-Side Events Reference
- POST Field Reference
- Licensing Information
- Legal Notices
converter.thumbnailResizeFailureDetector Property HTML5/Flash Uploader JavaScript
Configures how the uploader tries to detect whether image resizing failed due to memory issues and whether to retry.
Syntax
$au.imageUploaderFlash({
converters : [
{
//...other params...
thumbnailResizeFailureDetector: 0,
//...other params...
}
]
})
Get/Set Value at Runtime
$au.imageUploaderFlash('uploaderID').converters().set(index).thumbnailResizeFailureDetector(value);
value = $au.imageUploaderFlash('uploaderID').converters().get(index).thumbnailResizeFailureDetector();
Property Value
Type: Number
If0 (default), it won't attempt to detect failures and do anything about it. If you set a larger value, it will be a number of attempts to create an image.
Default value is 0.
Remarks
Under certain circumstances, a browser may fail to process an image (e.g. resize it). For example, it may happen if the system runs out of memory. Unfortunately, JavaScript does not give any means to handle this situation gracefully. It will just silently fail and return a blank image. As a result, you will observe an empty black image.
This property gives you an opportunity to handle this situation. For example:
- Keep trying. Set this value to, say, 10. If some image is blank after resize, the uploader will try to resize the image again. If the image is blank again, it will try one more time - until the number of attempts reach the amount you have specified.
- Fallback to the source image. Set this value to, say, 1, and add a second converter to mode, e.g.
*=Thumbnail;SourceFile. In this case, if the image is blank, it will notice the failure and switch to a fallback converter (SourceFile).
To speed things up, the algorithm does not check 100% of pixels. It breaks the image into a grid and selects certain pixels based on this grid. It works great with photos, but if you are uploading images with large amount of transparent pixels, it may produce false positives. Be careful!
If necessary, you may fine-tune the algorithm. To do it, instead of a number, pass the following JSON:
{
step : 10, // grid size
topPadding : 0, // offset from the top in percent
leftPadding : 0, // offset from the left border in percent
rightPadding : 0, // offset from the right border in percent
bottomPadding : 0, // offset from the bottom in percent
attemptCount : 0 // the number you would pass to this param normally
}