이 함수는 선택된 파일 목록을 반환합니다.
매개변수
이름 | 유형 | 설명 |
---|---|---|
|
문자열 |
선택된 파일을 반환하도록 지정하는 옵션입니다. |
|
함수 |
콜백 함수. 사용자가 선택기를 취소하면 콜백이 호출되지 않습니다. |
사용법
// get/set list of assets
SitesSDK.getProperty('componentAssets', callback);
SitesSDK.setProperty('componentAssets', [assets]);
// invoking list creator
// after calling this, the developer needs to call setProperty against
// 'componentAssets' to persist all currently used assets
//
// args:
// fileTypes - list of supported file types
// multiSelect - single or multiple file select
//
// returns a list of selected assets. If user cancels out of the picker,
// the callback is never called
SitesSDK.filePicker({options}, callback);
//
// example 'componentAssets' JSON returned:
//
'componentAssets': [{
'name': <nameOfAssetInContentFolder>, // this is used to uniquely and persistently identify the asset. It is typically prefixed by the ¿originalName¿ followed by a 16 digit string
'originalName': <originalName>, // name of the asset as selected from DOCS
'description': <description>, // description/other attributes that are available from DOCS
'url': <fully qualified url to the asset>
}]