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.