Skip to content

Commit

Permalink
fix(nextcloud): Downloading file via WebDAV to memory
Browse files Browse the repository at this point in the history
  • Loading branch information
provokateurin committed Jul 30, 2023
1 parent c8fca47 commit c8c8cde
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 c8c8cde

Please sign in to comment.