未验证 提交 53b3e361 编写于 作者: O openharmony_ci 提交者: Gitee

!7669 modify js-apis-medialibrary.md

Merge pull request !7669 from 胡伟奇/modify_medialibrary_md
...@@ -1912,13 +1912,11 @@ async function example() { ...@@ -1912,13 +1912,11 @@ async function example() {
extendArgs: "", extendArgs: "",
}; };
let fetchFileResult = await media.getFileAssets(getImageOp); let fetchFileResult = await media.getFileAssets(getImageOp);
fetchFileResult.getPositionObject(1, (err, fileAsset) => { fetchFileResult.getPositionObject(1) .then(function (fileAsset){
if (err) { console.log('[Demo] fileAsset.displayName : ' + fileAsset.displayName);
console.error('Failed '); }).catch(function (err) {
return; console.info("[Demo] getFileAssets failed with error:" + err);
} });
console.log('fileAsset.displayName : ' + fileAsset.displayName);
})
} }
``` ```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册