Browse Source

Merge pull request #514 from provokateurin/fix/webdav-download

fix(nextcloud): Downloading file via WebDAV to memory
pull/508/head
Kate 1 year ago committed by GitHub
parent
commit
3a67dbafad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      packages/nextcloud/lib/src/webdav/client.dart

3
packages/nextcloud/lib/src/webdav/client.dart

@ -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(

Loading…
Cancel
Save