Skip to content

Function: saveToPhoto() ​

ts
function saveToPhoto(filePath): Promise<SaveToPhotoResult>;

Save an image or video to the device's photo library. Requires photo library permission.

Parameters ​

ParameterTypeDescription
filePathstringAbsolute path of the file.

Returns ​

Promise<SaveToPhotoResult>

Whether the file was saved.

Throws ​

Error synchronously when filePath is empty.

Released under the MIT License.