var physique: some View {
PhotosPicker(choice: $selectedItem, matching: .any(of: [.images, .videos]), photoLibrary: .shared()){
Picture(systemName: "digicam.fill")
.resizable()
.aspectRatio(contentMode: .match)
.body(top: 20)
.padding(2)
}
.onChange(of: selectedItem) { newItem in
// merchandise dimension in kilobytes?
}
}
Is there a technique to get the scale of selectedItem
in Kilobytes?
I understand how to do it by discovering out the URL of the merchandise first after which the scale of it by the URL, however that is kinda a dumb workaround because the merchandise is already chosen and it is also kinda sluggish.