You are currently browsing legacy 3.5 version of documentation. Click here to switch to the newest 5.1 version.

We can help you with migration to the latest RavenDB

Contact Us Now
see on GitHub

Commands: DownloadAsync

The DownloadAsync method is used to retrieve the file's content and metadata.


Task<Stream> DownloadAsync(string filename, Reference<RavenJObject> metadata = null, long? from = null, long? to = null);
filename string The name of a downloaded file
metadata Reference<RavenJObject> Reference of metadata object where downloaded file metadata will be placed (if not null, default: null)
from long? The number of the first byte in a range when a partial download is requested
to long? The number of the last byte in a range when a partial download is requested

Return Value
Task<Stream> A task that represents the asynchronous download operation. The task result is a file's content represented by a readable stream.


var metadata = new Reference<RavenJObject>();

var data = await store
		from: 0,
		to: 200);