SitesSDK.setProperty('componentAssets', [assets])

이 함수는 사용자정의 구성요소 대신 저장된 사이트 자산 목록을 업데이트합니다.

매개변수

이름 유형 설명

componentAssets

문자열

구성요소 자산 목록을 생성합니다.

assets

JSON 객체

선택된 자산 목록을 반환합니다.

인수

속성 이름 설명

filetypes

지원되는 파일 유형 목록입니다.

multiSelect

단일 또는 다중 파일을 선택합니다.

사용법

// 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>
}]