harmony 鸿蒙File Subsystem Changelog
File Subsystem Changelog
cl.file.1 Change of picker PhotoViewPicker.save() Compatibility
Changed the PhotoViewPicker.save() interface compatibility.
Change Impact
For applications developed based on earlier versions, PhotoViewPicker.save() saves files only to the file manager directory, and these files are invisible in Gallery. To save a file to Gallery, create a media asset using a security component. For details, see Creating a Media Asset Using a Security Component.
Key API/Component Changes
Module | Method/Attribute/Enum/Constant | Change Type |
---|---|---|
picker | function PhotoViewPicker.save(option?: PhotoSaveOptions) : Promise<Array<string>> | Interface compatibility |
picker | function PhotoViewPicker.save(option: PhotoSaveOptions, callback: AsyncCallback<Array<string>>) : void | Interface compatibility |
picker | function PhotoViewPicker.save(callback: AsyncCallback<Array<string>>) : void | Interface compatibility |
Adaptation Guide
PhotoViewPicker.save() starts FilePicker and saves files to a directory in the system file manager. From OpenHarmony_4.0.11.2, FilePicker cannot access assets in the media library. As a result, the files in the file manager directory cannot be viewed in Gallery. To enable the images or videos to be viewed in Gallery, use <SaveButton> to save images or videos.
Example
See Creating a Media Asset Using a Security Component.
你可能感兴趣的鸿蒙文章
harmony 鸿蒙OpenHarmony Docker镜像
harmony 鸿蒙OpenHarmony Docker Image
harmony 鸿蒙IDL Specifications and User Guide (for System Applications Only)
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦