Skip to content

Commit

Permalink
Merge pull request #5 from ekreative/fix/unable-to-instantiate-upload…
Browse files Browse the repository at this point in the history
…ble-data-reader

fix/unable-to-instantiate-uploadble-data-reader
  • Loading branch information
vasylnahuliak authored Feb 19, 2025
2 parents 93cdd58 + 4a42ae2 commit ba27408
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 ba27408

Please sign in to comment.