diff --git a/Sources/NextcloudFileProviderKit/Interface/NextcloudKit+RemoteInterface.swift b/Sources/NextcloudFileProviderKit/Interface/NextcloudKit+RemoteInterface.swift index 36a1aba..59ec4f0 100644 --- a/Sources/NextcloudFileProviderKit/Interface/NextcloudKit+RemoteInterface.swift +++ b/Sources/NextcloudFileProviderKit/Interface/NextcloudKit+RemoteInterface.swift @@ -190,10 +190,10 @@ extension NextcloudKit: RemoteInterface { url: URL, options: NKRequestOptions, taskHandler: @escaping (URLSessionTask) -> Void ) async -> (account: String, data: Data?, error: NKError) { await withCheckedContinuation { continuation in - getPreview( - url: url, options: options, taskHandler: taskHandler + downloadPreview( + url: url, account: account.ncKitAccount, options: options, taskHandler: taskHandler ) { account, data, error in - continuation.resume(returning: (account, data, error)) + continuation.resume(returning: (account, data?.data, error)) } } }