FileBrowserServicesGetThumbnails Method |
Namespace: IngeniuxCMService
public XHRServiceResponseGeneric<FileBrowserThumbnailsList> GetThumbnails( string[] assetIds, string type )
The array of file names.
["aeroplane.png", "balloon.png", "bg-green.png", "bg-heading.png", "bg-sky.png"]
The type of asset this folder is folder. The choices are "File", "Image", "Media", "Prebuilt", "Stylesheet"
The thumbnail information of given files.
{ "code": 0, "error": null, "message": { "list": [{ "basePath": "Images\/homeslider", "extension": "png", "fileName": "aeroplane.png", "height": 397, "imageSrc": "xml\/Images\/homeslider\/aeroplane.png", "randomizer": "2f5979cbc25f4ac7b1d77aa221faa726", "size": "137.25 KB", "width": 600 }, { "basePath": "Images\/homeslider", "extension": "png", "fileName": "balloon.png", "height": 512, "imageSrc": "xml\/Images\/homeslider\/balloon.png", "randomizer": "2f5979cbc25f4ac7b1d77aa221faa726", "size": "134.92 KB", "width": 384 }, { "basePath": "Images\/homeslider", "extension": "png", "fileName": "bg-green.png", "height": 20, "imageSrc": "xml\/Images\/homeslider\/bg-green.png", "randomizer": "2f5979cbc25f4ac7b1d77aa221faa726", "size": "0.95 KB", "width": 20 }, { "basePath": "Images\/homeslider", "extension": "png", "fileName": "bg-heading.png", "height": 23, "imageSrc": "xml\/Images\/homeslider\/bg-heading.png", "randomizer": "2f5979cbc25f4ac7b1d77aa221faa726", "size": "0.93 KB", "width": 30 }, { "basePath": "Images\/homeslider", "extension": "png", "fileName": "bg-sky.png", "height": 1600, "imageSrc": "xml\/Images\/homeslider\/bg-sky.png", "randomizer": "2f5979cbc25f4ac7b1d77aa221faa726", "size": "0.54 KB", "width": 5 }] } }
Retrieving thumbnails is an expensive operation for image files, since we need to dig into each image file to grab the sizing information.
To make sure the response time is reasonable for this operation, do not input too many files.
Generally, to make sure the response is less than 5 seconds, no more than 100 files.