title: How to get selected image file name from ImagePicker using Swift/SwiftUI
body: <p>I am using ImagePicker with SwiftUI by UIImagePickerController. It can select an Image. But I want to know the original image file name also. Is there any way to do this?</p>
  <p>I already tried this using following codes:</p>
  <pre><code>if let url = info[UIImagePickerController.InfoKey.imageURL] as? URL {
  
    imagePicker.fileName = url.lastPathComponent
  
    imagePicker.fileType = url.pathExtension
  
  }
  </code></pre>
  <p>But above code gives the temporary image file name.</p>