Skip to content

Commit

Permalink
Merge pull request #514 from provokateurin/fix/webdav-download
Browse files Browse the repository at this point in the history
fix(nextcloud): Downloading file via WebDAV to memory
  • Loading branch information
provokateurin authored Jul 31, 2023
2 parents 1df5101 + c8c8cde commit 3a67dba
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/nextcloud/lib/src/webdav/client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,7 @@ class WebDavClient {
);

/// download [remotePath] and store the response file contents to String
Future<Uint8List> download(final String remotePath) async =>
Uint8List.fromList((await (await downloadStream(remotePath)).join()).codeUnits);
Future<Uint8List> download(final String remotePath) async => (await downloadStream(remotePath)).bodyBytes;

/// download [remotePath] and store the response file contents to ByteStream
Future<HttpClientResponse> downloadStream(final String remotePath) async => _send(
Expand Down

0 comments on commit 3a67dba

Please sign in to comment.