From 15c78f3b351b955e89dd52e79e30413c5de55b52 Mon Sep 17 00:00:00 2001 From: Qilong Zhang Date: Mon, 6 Jun 2022 21:27:29 +0800 Subject: [PATCH] medialibrary:fix error display name Signed-off-by: Qilong Zhang Change-Id: I0646a21a2436aafb3b3b82c888f0af2b02e09631 --- .../entry/src/main/ets/test/fileAssetCallBack2.test.ets | 2 +- .../entry/src/main/ets/test/fileAssetPromise2.test.ets | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/multimedia/medialibrary/mediaLibrary_js_standard/entry/src/main/ets/test/fileAssetCallBack2.test.ets b/multimedia/medialibrary/mediaLibrary_js_standard/entry/src/main/ets/test/fileAssetCallBack2.test.ets index 66ca0dec2..a5b620eb7 100644 --- a/multimedia/medialibrary/mediaLibrary_js_standard/entry/src/main/ets/test/fileAssetCallBack2.test.ets +++ b/multimedia/medialibrary/mediaLibrary_js_standard/entry/src/main/ets/test/fileAssetCallBack2.test.ets @@ -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 () => { diff --git a/multimedia/medialibrary/mediaLibrary_js_standard/entry/src/main/ets/test/fileAssetPromise2.test.ets b/multimedia/medialibrary/mediaLibrary_js_standard/entry/src/main/ets/test/fileAssetPromise2.test.ets index ccb693a02..b59006d9d 100644 --- a/multimedia/medialibrary/mediaLibrary_js_standard/entry/src/main/ets/test/fileAssetPromise2.test.ets +++ b/multimedia/medialibrary/mediaLibrary_js_standard/entry/src/main/ets/test/fileAssetPromise2.test.ets @@ -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(); -- GitLab