You are currently browsing legacy 3.0 version of documentation. Click here to switch to the newest 4.2 version.

We can help you with migration to the latest RavenDB

Contact Us Now
see on GitHub

Commands: UpdateMetadataAsync

UpdateMetadataAsync is used if you need to change just the file's metadata without any modification to its content.

Syntax

Task UpdateMetadataAsync(string filename, RavenJObject metadata, Etag etag = null);

Parameters
filename string The modified file name
metadata RavenJObject New file metadata
etag Etag The current file Etag, used for concurrency checks (null skips check)

Return Value
Task A task that represents the asynchronous metadata update operation.

Example

await store
	.AsyncFilesCommands
	.UpdateMetadataAsync(
		"/movies/intro.avi",
		new RavenJObject()
		{
			{
				"AllowRead", "None"
			}
		});