ฟังก์ชันนี้จะอัปเดตลิสต์ของข้อมูลไซต์ที่เก็บไว้แทนองค์ประกอบที่กำหนดเอง
พารามิเตอร์
ชื่อ | ประเภท | คำอธิบาย |
---|---|---|
|
สตริง |
สร้างลิสต์ของข้อมูลองค์ประกอบ |
|
ออบเจกต์ JSON |
แสดงผลลิสต์ของรายการที่เลือกไว้ |
อาร์กิวเมนต์
ชื่อคุณสมบัติ | คำอธิบาย |
---|---|
|
ลิสต์ของประเภทไฟล์ที่รองรับ |
|
เลือกหนึ่งไฟล์หรือหลายไฟล์ |
การใช้งาน
// 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>
}]