I'm not getting the image name from photo library. Anyone here knows a proper way to get image name?
Note: PHAsset.fetchAssets(withALAssetURLs: [imageURL], options: nil)
this is deprecated.
Swift only
Thanks
I found a way
if let asset = info["UIImagePickerControllerPHAsset"] as? PHAsset{
if let fileName = asset.value(forKey: "filename") as? String{
print(fileName)
}
}
This will return you the actual file name in the photo library.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With