Click or drag to resize

FileBrowserServicesCreateComponent Method


Creates a component for a binary asset file. This operation will create a reference for the asset in CMS content

Namespace:  IngeniuxCMService
Assembly:  IngeniuxCMService (in IngeniuxCMService.dll) Version: 10.5.94
Syntax
public XHRServiceResponseGeneric<FileBrowserComponentCreateResult> CreateComponent(
	FileBrowserCreateComponentInput info
)

Parameters

info
Type: FileBrowserCreateComponentInput

The instructions on how to create the component, which include whether or not to create a thumbnail for image asset

Examples
Sample JSON input
JavaScript
{
    "info": {
        "basePath": "icons",
        "thumb": {
            "createThumbnail": false,
            "width": "100",
            "height": "21"
        },
        "metaData": {
            "createComponent": true,
            "src": "Images/icons/zBrush.gif",
            "fileName": "zBrush.gif",
            "alt": "Test",
            "keywords": "Test ",
            "hspace": "",
            "vspace": "",
            "align": "",
            "border": ""
        }
    }
}

Return Value

Type: XHRServiceResponseGenericFileBrowserComponentCreateResult

The information of component that was created, include the component page id and thumb nail information for image asset

Examples
Sample JSON return
JavaScript
{
    "code": 0,
    "error": null,
    "message": {
        "newComponent": {
            "id": "x116",
            "thumb": null
        }
    }
}
See Also