From c8c8cdec729530d0129192e4d53ae9fb64ead013 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Sun, 30 Jul 2023 15:13:09 +0200 Subject: [PATCH] fix(nextcloud): Downloading file via WebDAV to memory --- packages/nextcloud/lib/src/webdav/client.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/nextcloud/lib/src/webdav/client.dart b/packages/nextcloud/lib/src/webdav/client.dart index e8efcbeb..4360b453 100644 --- a/packages/nextcloud/lib/src/webdav/client.dart +++ b/packages/nextcloud/lib/src/webdav/client.dart @@ -200,8 +200,7 @@ class WebDavClient { ); /// download [remotePath] and store the response file contents to String - Future download(final String remotePath) async => - Uint8List.fromList((await (await downloadStream(remotePath)).join()).codeUnits); + Future download(final String remotePath) async => (await downloadStream(remotePath)).bodyBytes; /// download [remotePath] and store the response file contents to ByteStream Future downloadStream(final String remotePath) async => _send(