i have defined the documentPicker like the following but i want now to get the size of the uploaded pdf in bytes.
func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentsAt urls: [URL]){
self.parent.docData = // here the assigned value should be the size of the pdf
}
for example its working in case of image like the following:
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
let image = info[.originalImage] as! UIImage
let picdata = image.jpegData(compressionQuality: 0.25)
self.parent.picData = picdata!
self.parent.picker.toggle()
}