未验证 提交 778b9c70 编写于 作者: 潘强标 提交者: Gitee

fix getThumbnail promise

Signed-off-by: Npanqiangbiao <panqiangbiao@huawei.com>
上级 f3e55a8f
...@@ -1156,8 +1156,12 @@ async function example() { ...@@ -1156,8 +1156,12 @@ async function example() {
}; };
const fetchFileResult = await media.getFileAssets(getImageOp); const fetchFileResult = await media.getFileAssets(getImageOp);
const asset = await fetchFileResult.getFirstObject(); const asset = await fetchFileResult.getFirstObject();
asset.getThumbnail(size, (err, pixelmap) => { asset.getThumbnail(size)
.then((pixelmap) => {
console.info('mediaLibraryTest : getThumbnail Successfull '+ 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.
先完成此消息的编辑!
想要评论请 注册