You are currently browsing legacy 3.0 version of documentation. Click here to switch to the newest 5.1 version.
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
|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|
|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 .AsyncFilesCommands .DownloadAsync( "/movies/intro.avi", metadata, from: 0, to: 200);