From 4a42ae2a0b4329f3120c1abf13df1b7819ff8cba Mon Sep 17 00:00:00 2001 From: Vasyl Nahuliak Date: Tue, 18 Feb 2025 11:51:10 +0100 Subject: [PATCH] fix: unable to instantiate uploadble data reader --- .../ImagePickerUploadController.swift | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/Sources/Filestack/UI/Internal/Controllers/ImagePickerUploadController.swift b/Sources/Filestack/UI/Internal/Controllers/ImagePickerUploadController.swift index faa76b8..0632982 100644 --- a/Sources/Filestack/UI/Internal/Controllers/ImagePickerUploadController.swift +++ b/Sources/Filestack/UI/Internal/Controllers/ImagePickerUploadController.swift @@ -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 {