Question: Friends, I would like a permanent solution to a script to change password without email access cpanel.

I tried the cpanel api but I could not ...

Could you help me?

I need a page where the User enter the email address and new password, after which the password is changed ...

Please help me ...

Answer: 
I know this thread is super old but i thought if someone finds it, here is a working answer in swift:

```
func fileName(for infoDict: [String : Any]) -> String? {
    guard let referenceURL = infoDict[UIImagePickerControllerReferenceURL] as? URL else { return nil }
    let result = PHAsset.fetchAssets(withALAssetURLs: [referenceURL], options: nil)
    guard let asset = result.firstObject else { return nil }
    let firstResource = PHAssetResource.assetResources(for: asset).first
    return firstResource?.originalFilename ?? asset.value(forKey: "filename") as? String
}

```
Swift 4 or later
Working on My Side for the captured image

Use :

```
    imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]){
            let fileName = FileInfo.getMediaName(info: info)
      }

```

class : pleas put the method **info[:]**

```
class FileInfo {
    // Return Media name
    static func getMediaName(info:[String : Any]) -> String {

        if let asset = info[UIImagePickerControllerPHAsset] as? PHAsset {
            let assetResources = PHAssetResource.assetResources(for: asset)
            let firstObj = assetResources.first?.originalFilename as! NSString
            print(firstObj)
            return firstObj
        }
    }
}

```

// IMG\_02256.jpeg