diff --git a/en/application-dev/file-management/photoAccessHelper-resource-guidelines.md b/en/application-dev/file-management/photoAccessHelper-resource-guidelines.md index d145589c1ad96aa8c9e4cc11d3112e40f4772678..4934fca1c911c104c04f47f16505f989b5d1ba3a 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 7c98b2f674aba77a5359179e2a56b56819784eb1..c88fc6536d5119a1bb6e994c4abd41270bc2d78a 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