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

!2629 【轻量级 PR】:fix getThumbnail promise

Merge pull request !2629 from 潘强标/N/A
......@@ -1156,8 +1156,12 @@ async function example() {
};
const fetchFileResult = await media.getFileAssets(getImageOp);
const asset = await fetchFileResult.getFirstObject();
asset.getThumbnail(size, (err, pixelmap) => {
asset.getThumbnail(size)
.then((pixelmap) => {
console.info('mediaLibraryTest : getThumbnail Successfull '+ pixelmap);
})
.catch((err) => {
console.info('mediaLibraryTest : getThumbnail fail'+ err);
});
}
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册