提交 15c78f3b 编写于 作者: Q Qilong Zhang

medialibrary:fix error display name

Signed-off-by: NQilong Zhang <zhangqilong3@huawei.com>
Change-Id: I0646a21a2436aafb3b3b82c888f0af2b02e09631
上级 23208c27
......@@ -84,7 +84,7 @@ export default function fileAssetCallBack2Test(abilityContext){
try {
const fetchFileResult = await media.getFileAssets(imagesfetchOp);
const asset = await fetchFileResult.getFirstObject();
const newName = 'newName' + new Date().getTime();
const newName = 'newName' + new Date().getTime() + '.jpg';
asset.displayName = newName;
const id = asset.id;
asset.commitModify(async () => {
......
......@@ -85,7 +85,7 @@ export default function fileAssetPromise2Test(abilityContext){
try {
const fetchFileResult = await media.getFileAssets(imagesfetchOp);
const asset = await fetchFileResult.getFirstObject();
const newName = 'newName' + new Date().getTime();
const newName = 'newName' + new Date().getTime() + '.jpg';
asset.displayName = newName;
const id = asset.id;
await asset.commitModify();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册