From 323ec9596378c2b25ae5d0ec7a59d1a82eafaba8 Mon Sep 17 00:00:00 2001 From: Annie_wang Date: Fri, 11 Aug 2023 10:11:47 +0800 Subject: [PATCH] update docs Signed-off-by: Annie_wang --- .../photoAccessHelper-resource-guidelines.md | 10 +++++----- .../photoAccessHelper-systemAlbum-guidelines.md | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/en/application-dev/file-management/photoAccessHelper-resource-guidelines.md b/en/application-dev/file-management/photoAccessHelper-resource-guidelines.md index d145589c1a..4934fca1c9 100644 --- a/en/application-dev/file-management/photoAccessHelper-resource-guidelines.md +++ b/en/application-dev/file-management/photoAccessHelper-resource-guidelines.md @@ -42,7 +42,7 @@ let fetchOptions = { }; ``` -Call **PhotoAccessHelper.getAssets** to obtain the image asset. +Call **PhotoAccessHelper.getAssets** to obtain image assets. ```ts try { @@ -55,7 +55,7 @@ try { } ``` -### Obtaining an Image or Video by URI +### Obtaining an Image or Video Asset by URI Example: Obtain the image with the file URI **file://media/Photo/1**. @@ -70,7 +70,7 @@ let fetchOptions = { }; ``` -Call **PhotoAccessHelper.getAssets** to obtain the image asset. +Call **PhotoAccessHelper.getAssets** to obtain image assets. ```ts try { @@ -103,7 +103,7 @@ let fetchOptions = { }; ``` -Call **PhotoAccessHelper.getAssets** to obtain the image assets. +Call **PhotoAccessHelper.getAssets** to obtain image assets. ```ts try { @@ -250,7 +250,7 @@ The files moved to the trash will be retained for 30 days, and deleted permanent **Prerequisites** -- A **photoAccessHelper** instance is obtained +- A **photoAccessHelper** instance is obtained. - The application has the **ohos.permission.WRITE_IMAGEVIDEO** and **ohos.permission.READ_IMAGEVIDEO** permissions. Example: Move the first file in the result set to the trash. diff --git a/en/application-dev/file-management/photoAccessHelper-systemAlbum-guidelines.md b/en/application-dev/file-management/photoAccessHelper-systemAlbum-guidelines.md index 7c98b2f674..c88fc6536d 100644 --- a/en/application-dev/file-management/photoAccessHelper-systemAlbum-guidelines.md +++ b/en/application-dev/file-management/photoAccessHelper-systemAlbum-guidelines.md @@ -5,7 +5,7 @@ The **photoAccessHelper** module provides APIs for managing system albums, inclu > **NOTE** > > Before you start, refer to [photoAccessHelper Overview](photoAccessHelper-overview.md) to learn how to obtain a **photoAccessHelper** instance and apply for permissions required. -> By default, the **photoAccessHelper** instance obtained in [photoAccessHelper Overview](photoAccessHelper-overview.md) is used when **photoAccessHelper** APIs are used. If the code for obtaining the **photoAccessHelper** instance is not added, an error indicating that **photoAccessHelper** is not defined is reported. +> By default, the **PhotoAccessHelper** instance obtained in [photoAccessHelper Overview](photoAccessHelper-overview.md) is used when **PhotoAccessHelper** APIs are used. If the code for obtaining the **PhotoAccessHelper** instance is not added, an error indicating that **PhotoAccessHelper** is not defined is reported. To ensure application running efficiency, most **photoAccessHelper** calls are asynchronous in callback or promise mode. The following code samples use promise-based APIs. For details about the APIs, see [Album Management](../reference/apis/js-apis-photoAccessHelper.md). Unless otherwise specified, all the media assets to be obtained in this document exist in the database. If no media asset is obtained when the sample code is executed, check whether the media assets exist in the database. @@ -133,8 +133,8 @@ Example: Unfavorite an image. **How to Develop** 1. [Obtain the image and videos in **Favorites**](#obtaining-images-and-videos-in-favorites). -2. Set **isFavorite** to **false**. -3. Use **FileAsset.favorite** to remove the image from **Favorites**. +2. Set **favoriteState** to **false**. +3. Use **FileAsset.setFavorite** to remove the image from **Favorites**. ```ts -- GitLab