Skip to content

Commit

Permalink
fix: unable to instantiate uploadble data reader
Browse files Browse the repository at this point in the history
  • Loading branch information
vasylnahuliak committed Feb 18, 2025
1 parent 93cdd58 commit 4a42ae2
Showing 1 changed file with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,19 +168,12 @@ private extension ImagePickerUploadController {

let registeredTypeIdentifiers = itemProvider.registeredTypeIdentifiers

switch self.config.imageURLExportPreset {
case .compatible:
if registeredTypeIdentifiers.contains(AVFileType.jpg.rawValue) {
typeIdentifier = AVFileType.jpg.rawValue
} else {
typeIdentifier = registeredTypeIdentifiers.first
}
case .current:
if registeredTypeIdentifiers.contains(AVFileType.heic.rawValue) {
typeIdentifier = AVFileType.heic.rawValue
} else {
typeIdentifier = registeredTypeIdentifiers.first
}
if registeredTypeIdentifiers.contains(AVFileType.heic.rawValue) {
typeIdentifier = AVFileType.heic.rawValue
} else if registeredTypeIdentifiers.contains(AVFileType.jpg.rawValue) {
typeIdentifier = AVFileType.jpg.rawValue
} else {
typeIdentifier = registeredTypeIdentifiers.first
}

guard let typeIdentifier = typeIdentifier else {
Expand Down

0 comments on commit 4a42ae2

Please sign in to comment.