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 /// download [remotePath] and store the response file contents to String
Future<Uint8List> download(final String remotePath) async => Future<Uint8List> download(final String remotePath) async => (await downloadStream(remotePath)).bodyBytes;
Uint8List.fromList((await (await downloadStream(remotePath)).join()).codeUnits);
/// download [remotePath] and store the response file contents to ByteStream /// download [remotePath] and store the response file contents to ByteStream
Future<HttpClientResponse> downloadStream(final String remotePath) async => _send( Future<HttpClientResponse> downloadStream(final String remotePath) async => _send(

Loading…
Cancel
Save