     public func imagePickerControllerDidCancel(_ picker: UIImagePickerController) {
         currentRequest?.handler(nil)
         currentRequest = nil
+    }
+
+    @available(iOS 14.0, *)
+    private func handleRequestWithFilesApp(kind: Kind, source: Source, handler: @escaping MediaHandler) -> UIViewController? {
+        let vc = UIDocumentPickerViewController(forOpeningContentTypes: kind.contentTypes, asCopy: false)
+        vc.delegate = self
+        vc.allowsMultipleSelection = false
+        self.currentRequest = Request(handler: handler, kind: kind)
+        return vc
+    }
+    
+    private func handleRequestWithImagePicker(kind: Kind, source: Source, handler: @escaping MediaHandler) -> UIViewController? {
+        guard UIImagePickerController.isSourceTypeAvailable(source.imagePickerSource) else {
+            handler(nil)
+            return nil
+        }
+
+        self.currentRequest = Request(handler: handler, kind: kind)
+        
+        imagePicker.allowsEditing = false
+        imagePicker.sourceType = source.imagePickerSource
+        if source == .camera {
+            imagePicker.cameraDevice = .front
+        }
+        imagePicker.delegate = self
+        switch kind {
+        case .video:
+            imagePicker.mediaTypes = [kUTTypeMovie as String]
+        case .photo, .thumbnail:
+            imagePicker.mediaTypes = [kUTTypeImage as String]
+        }
+        
+        return imagePicker
     }
     
     private func cachePathForMedia(_ kind: Kind) -> URL {

                return "mov"
            }
        }
    }
    
    public enum Source {
        case photoAlbum
        case camera
        
        func toUIKit() -> UIImagePickerController.SourceType {
            switch self {
            case .camera:
                return .camera
            case .photoAlbum:
                return .photoLibrary
            }
        }
    }

            return nil
        }
        
        switch source {
        case .filesApp:
            guard #available(iOS 14.0, *) else { fatalError() }
            return handleRequestWithFilesApp(kind: kind, source: source, handler: handler)
        case .camera, .photoAlbum:
            return handleRequestWithImagePicker(kind: kind, source: source, handler: handler)
        }
    }

    public func createVideoThumbnail(forURL videoURL: URL) -> Task<URL> {
        let deferred = Deferred<Task<URL>.Result>()

