提交 6db9e201 编写于 作者: Z zhang-daiyue

modify js-apis-medialibrary.md

Signed-off-by: Nzhang-daiyue <zhangdaiyue1@huawei.com>
Change-Id: If27c27639b01446482a8151cbf0288ea75fbe56d
上级 98d3da89
......@@ -1912,13 +1912,11 @@ async function example() {
extendArgs: "",
};
let fetchFileResult = await media.getFileAssets(getImageOp);
fetchFileResult.getPositionObject(1, (err, fileAsset) => {
if (err) {
console.error('Failed ');
return;
}
console.log('fileAsset.displayName : ' + fileAsset.displayName);
})
fetchFileResult.getPositionObject(1) .then(function (fileAsset){
console.log('[Demo] fileAsset.displayName : ' + fileAsset.displayName);
}).catch(function (err) {
console.info("[Demo] getFileAssets failed with error:" + err);
});
}
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册