Saves one or more images or videos in a **photoPicker** page. This API uses a promise to return the result. You can pass in **PhotoSaveOptions** to specify the file names of the images or videos to save. The **save()** API saves the file in the file manager, not in the Gallery.
Saves one or more images or videos in a **photoPicker** page. This API uses a promise to return the result. You can pass in **PhotoSaveOptions** to specify the file names of the images or videos to save. The **save()** API saves files in the file manager, not in **Gallery**.
Saves one or more images or videos in a **photoPicker** page. This API uses an asynchronous callback to return the result. You can pass in **PhotoSaveOptions** to specify the file names of the images or videos to save. The **save()** API saves the file in the file manager, not in the Gallery.
Saves one or more images or videos in a **photoPicker** page. This API uses an asynchronous callback to return the result. You can pass in **PhotoSaveOptions** to specify the file names of the images or videos to save. The **save()** API saves files in the file manager, not in **Gallery**.
Saves one or more images or videos in a **photoPicker** page. This API uses an asynchronous callback to return the result. The **save()** API saves the file in the file manager, not in the Gallery.
Saves one or more images or videos in a **photoPicker** page. This API uses an asynchronous callback to return the result. The **save()** API saves files in the file manager, not in **Gallery**.
console.error('PhotoViewPicker failed with err: '+err);
}catch(error){
leterr:BusinessError=errorasBusinessError;
console.error('PhotoViewPicker failed with err: '+JSON.stringify(err));
}
}
```
## DocumentViewPicker
Provides APIs for selecting and saving non-media files, for example, documents in a variety of formats. Before using the APIs of **DocumentViewPicker**, you need to create a **DocumentViewPicker** instance.
Provides the **DocumentViewPicker** object for selecting and saving documents in different formats. Before using the APIs of **DocumentViewPicker**, you need to create a **DocumentViewPicker** instance.
| maxSelectNumber<sup>10+</sup> | number | No | Maximum number of files or directories that can be selected.<br>Value range: 1–500<br>Maximum value: **500** |
| defaultFilePathUri<sup>10+</sup> | string | No | Path of the file or directory to select.|
| fileSuffixFilters<sup>10+</sup> | Array<string> | No | File name extensions of the documents to select.|
## DocumentSaveOptions
Defines the options for saving documents.
...
...
@@ -753,7 +782,9 @@ Defines the options for saving documents.
| newFileNames? | Array<string> | No | Names of the documents to save. If this parameter is not specified, the user needs to enter the document names. |
| newFileNames | Array<string> | No | Names of the documents to save. If this parameter is not specified, the user needs to enter the document names. |
| defaultFilePathUri<sup>10+</sup> | string | No | Path of the file or directory to save.|
| fileSuffixChoices<sup>10+</sup> | Array<string> | No | File name extensions of the documents to save.|
## AudioSelectOptions
...
...
@@ -769,4 +800,4 @@ Defines the options for saving audio files.
| newFileNames? | Array<string> | No | Name of the audio files to save. If this parameter is not specified, the user needs to enter the file names.|
| newFileNames | Array<string> | No | Name of the audio files to save. If this parameter is not specified, the user needs to enter the file names.|